Data is dissappearing

I have a very simple form. Where I am requesting GPS location.

On submit I have custom action, where I add in UUID, timesamp and then save the GPS.

When I go to the table I see the entries, but in the app is not displaying the rows in the inline list.

When I close the app in the editor and then go back in, the row is still there with some data but the rest is gone.

Using an onSubmit action to set column values with an Add Form has always been a bit touch and go.
You’d be much better off using screen/special values that are submitted together with the form.

Another option might be to try the new wait action to add a short delay before the Set Column Values, but personally I would even avoid that. Just submit everything in one shot.

Hi Darren,

Can you please give me a bit more direction on screen/special values that are submitted with the form ?
thanks

I did a NEW Screen instead of a FORM and then created a button with a custom action to Add NEW ROW. It seems to be working for now.

Is that what you meant or some thing different.

In the left hand panel, add a new component. You will see a bunch of different components that are not usually there, such as user profile components and special value components. I also prefer adding the necessary components this way instead of using On Submit. Like @Darren_Murphy said, On Submit touch and go.

This works, but will eat up edits faster.

1 Like

Hi Jeff/Darren,

Thanks for this. I found the extra components, they seem to be only available on certain screens and that makes sense.

Two questions of clarification please

  1. Is this just a graphical way of doing what is in the custom actions interface, and you are suggesting that it is better to use these components then to do it the custom action like I was ?
  2. How will this save on edits ? With edits on new screen, does it not bunch all the edits together into one edit at the time of my writing using custom action ?

Yes, those extra components are available when you are on a Form screen, Add Form screen or Edit form screen.

There is a difference. When you use the component, it adds those values at the same time that the row is added. If you use On Submit, it attempts to update the row AFTER it has been added. That’s where you run into trouble, because the row may not be completely added when those actions run, and I suspect that is why you had problems.

Forms do not perform an update until you click on submit. On the other hand, a Detail Screen (including New Screen) will perform an update for each and every value that you change as you are changing them. That’s because they are directly updating the database in real time, unlike a form screen that only performs an update when you click on submit.

1 Like

Ahh… I think I got it… Thanks guys.

1 Like