I have created a form that allows customers to fill-in their information such as name, address, etc. . I added a button at the bottom that goes to a confirmation page with the current customer’s info so he can check whether it is correct before submitting it to a more permanent data table. Here’s how I think the workflow needs to be:
When the form button is clicked > Save the form inputs/info in a data table that holds the info temporarily (I will call this temp table) > Go to the Info Confirmation page > Retrieve and display the info from temp table
I was able to do this much.
The trouble I am have is making the info temporary in the temp table. I think before I save the new info into the temp table, I need to clear any previous info already in it. Otherwise, the temp table will have multiple records, causing the Confirmation page to show multiple records rather than only the current customer’s info because there is no command that tells the app to save only the current customer’s info in the temp table.
But I couldn’t get the delete function to work. I tried to look up online how the use the delete command, but it doesn’t appear my options are the same. Here is what I see:
There are a couple of ways to do what you want. But if you want to use this temp table method:
When the user clicks “save”, write out your temp table. Then go your your confirmation page, BUT pass the unique ID of the just-created temp row, like this:
When your confirmation page opens, add code to the “when page opens” to get data from the page URL and get the tempid. Use this value on your confirmation page to re-retrieve the row from your temp table.
If you need to delete this, then you can just do this:
Now, having said all this, you could still have lots of temp rows out there that you will never delete because the user could just get to your confirmation page and never complete it. So the temp row you write will always be out there.
Instead of having a whole new page acting as your confirmation, you could add a “pop up” component to your page and simply use that as your confirmation instead of creating an entirely new “confirmation page”.
This pop up could have two buttons - one that kicks off the workflow to actually save the data and the other to resume editing.
If you want to use this temp table method then this won’t work but this is maybe one of the quicker, alternative solutions.
First, you want to set a new page-level custom state. Let’s call it arg_tempid, of type text.
Click on the page (be sure to NOT click on a page element, but the page itself). You’ll get a popup of the page info. At the top, click the little “i” icon.
From this point on, you can now reference the custom state’s value which now holds the unique ID of row of your temporary table. Use this to retrieve the data to display to the user by just doing a basic retrieve.
Also, is your user logged on when they are doing this? If so, you can create a new field on the User table called temporaryID where you can store the unique ID of the temporary table row they created. Then they can go to your confirmation page at any time and you can retrieve the row based on the value in the User’s temporaryID field.