Update/Append to same row in database (w/ Pic)

Hello!

What is the most efficient way (if there is such a thing, lol) to update/append and entry to a database.

Currently When I go into the BackOffice, I find the entry and click on it.

I’d like to have a screen pop so that extra information can be added but to the SAME ROW in the database.

Thank you!

You have several options. You can use a ‘Show Detail Screen’, ‘Show New Screen’, ‘Show Edit Screen’ action on the button to get a screen attached to the same row. The Edit Screen will have a submit button, but Detail Screen and New Screen, will update records in real time without the need for a submit button…unless you are making a custom edit screen and build in some logic to set values using a Set Column action.

It all depends on the flow that you want.

2 Likes

Thank you for this info. I’m still missing a step. If you’d be open to it, here’s a video of the steps I am currently doing. Maybe a setting is off somewhere? 2023-05-30_00-00-34 - TechSmith Screencast - TechSmith Screencast

Thank you

What you have seems fine. When you click on the Edit button, it brings up the Edit screen and you can add any components you want to that screen. You can add components to show existing information as well as component to enter additional information. So, I think you are there, you just need to modify that edit screen you showed in your video.

Ok. If you don’t mind, I’m going to video record my process and report back here… because something isn’t correlating once I try to add components.

I thought I was doing something wrong before (I deleted the previous components before I sent the video) because nothing was showing up on that edit screen.

Hello again!

Hope all is well!

Q: How can I start to investigate why my Edit Form doesn’t update the same row of data? It puts the updated data on it’s own row but I don’t want multiple entries.

I hope that makes sense.


What do you mean by “multiple entries”? Do you have any on-submit actions for the edit screen?

Meaning, I was trying to edit just ONE row in backoffice. I keep getting duplicates.

Here’s a video: 2023-06-03_22-52-53 - TechSmith Screencast - TechSmith Screencast

In this part, please click the “General” tab on the right side of the screen and show us the on-submit action that goes with your edit screen. It seems like you’re having an Add row action in there.

3 Likes

Bingo! Awesome!! Thanks so much!

What is the best way to clear the form after it adds the row?

Thanks again!

Clear which form?
What was shown in your video is an Edit Form - there is nothing to clear. Just submit and you’re done.

With a native Add Form, again there is nothing to clear. A form is submitted, a row is added and that’s it.

The only time you need to worry about clearing a form is when you’re using a non-native (custom) form. And the best way to do that is as part of the action that opens the form.

2 Likes

Thank for that.

“do that is as part of the action that opens the form”

Where do I set this in the custom form?

You don’t do it in the form, you do it in the action that opens the form.
So if you’re using a custom form, you probably have an action that does either “Show Detail Screen” or “Show New Screen” to open your form. What you should do is change that to a custom action with two steps. The first step will clear the form columns, and the second step will open it.

2 Likes

Here’s a walk through of what I’m seeing. I THINK I see what you are suggesting though. The “Submit” button has the “On Submit” field under General.

I have been setting the column values to “clear value” thinking it would “clear the form” (not the data in the row) for the next set of entries.

I’m definitely missing a connection between the two here. Maybe because I am using a container and I should be using a FORM container? Action Row? I’m stumped. Sorry for all of the typing. lol

Where is the combo action in the screenshot used? Are you using the Credit Spreads tab to create new rows?

Here’s a walk through of what I am seeing. :+1:

I’m lost on what you are trying to do, but here is what I’m seeing in your last video. It appears that your table has an existing row. When you open your form (which is actually a detail screen connected to that existing row…aka ‘Custom Form’), you are updating that row in real time as you type. Your submit button technically isn’t doing much of anything anything, like adding a row. All it’s doing is clearing all of the columns you just filled in. I don’t see any Add Row action, or anything that would take those values you entered and write them to a new row or different columns in the same row. What your submit button is set up to do is literally clear everything you just filled in for that row. If your intention is to add a new row, then you need an Add Row action before clearing everything. You have a custom form, so it works differently from a native form which always adds a row. In this case, you have to explicitly add the add row action.

Now if I misunderstood and you actually do want to update the current row and clear values in that same row, then maybe you need two sets of columns. One set that gets filled by the user on the screen, and a second set that gets filled after the button is pressed, which moves the values from the first set of columns to the second set of columns before clearing the first set of columns. I’m not sure if I’m understanding your goal. It would most likely make more sense to use an Edit screen to update data in an existing row, but it seems that you want a different experience. I guess I don’t understand why you would want to update values in a row, but not see the values you just updated in your form after you submit it, just to fill the form with new values that will overwrite what you had previously submitted to the same row. Just not understanding your goal, so maybe we are headed down a rabbit hole.

1 Like

Thanks for the response, hopefully this will make it clearer.

  1. I input the information in on the main screen and hit “Submit”, it creates the data in the row. :white_check_mark:
  2. So I need to add: A. more transactions by B. returning to that main screen and input more data. :white_check_mark:
  3. When I get there, the data I just input is STILL THERE but I need the form to be CLEARED (reset, prepped, blank, etc) for the NEXT transaction. :x:

Is that clearer? Sorry if it’s confusing, I’m new to GlideApps.

I will investigate it from this angle again and see what happens. Thanks!