Hey Community,
On the Low Code App I have a grid where I use the action "Execute component action" > Grid, fetch the data > grid, MyGridName
I do the same for a table "Execute component action" > table, fetch the data > table, MyTableName
Both the table and the grid use the same GQI ad hoc datasource.
The table shows the latest data which I would expect but the grid does not.
Am I missing something in the behaviour?
Both have the same components setting, I tried changing them but it did not help.
Thanks in advance and Best Regards,
Eloy
Hi,
You config sounds perfectly fine and should work, so I have a feeling something else is preventing the grid from receiving the trigger...
Some things to check:
- Are both the table and grid visible in the same view and is fetch the data of both components linked to the same event? If the query is exactly the same, components will only fire the query once and share its result. There used to be an issue in that case were not all visuals were showing the latest state. If your setup does indeed trigger both fetch the data actions at the same time, it would be interesting for us to know your web version (Top right user icon > About > Versions > Web) to verify whether or not this has been fixed in a newer version.
- If the above is not the case, can you reproduce the issue on a brand new app? If you cannot reproduce it, your app might be in an invalid state. In that case, I would reach out to our support so we can properly investigate what exactly is going on.
Hi Eloy,
This is indeed something that can happen. Depending on the data you are working with, writes could take a while before a read is correctly returning the data. Two ways to work around this is either adding a sleep in the script or implementing realtime updates in the ad hoc datasource. With realtime updates, you don't even need the fetch the data action at all, and you will always see the latest changes without a need to refresh (eg when the changes were applied by other users). Of course, a Thread.Sleep is way less work to implement.
Hi Gilles,
thanks for the quick reply.
I have tested it also only with the event "action > Grid, fetch the data" but still it does not show the latest data.
The Web Version is 10.6.6 (CU0).
I think I found the issue. As a action I am executing a automation script and on completion I am doing "action > Grid, fetch the data". When I do action > execute script > upon completion > action > Grid, fetch the data > upon completion > action > Grid, fetch the data I get the latest data.
The script (CreateRoute in Cerebrum) also updates an table which I am reading of information changed by the script. So it seems like upon completion of the automation script the tables data has not yet changed.
After a short delay <1 second it fetches the data successfully. Is there a specific solution for that?