set field defaults on mobile

set field defaults on mobile

  

I have a screen that let's the user add/update data. 

Data for the screen is coming from a table in LocalStorage 

Screen has also 2 parameters that should be used when a new record is added. i.e. i'm coming from another screen that passes in lat/long from a map.

If the user adds a new record i'd like to preset fields with the values from the parameters.

In the web apps there is a Preparation action where i could do something like this. There seems no such action for mobile apps. I looked at the On Initialize , On Ready events but if i try to set values for data in local storage in these events i get warnings that the data has not been retrieved yet when these events occur.

So where could i put my code to use the parameters to set values in mobile apps? 

Thank you for any tips.

Fabian 

Solution

Hi Fabian,

If you want to execute logic after the data has been fetched, you should do it the the On After Fetch of the aggregate that retrieves the data from local storage.

Solution

Hi Joao

That was it. Thank you for teaching me about On After Fetch events.

Fabian