I have a section/group on a page which uses an API to downloaded certain data. The download starts once the section becomes ‘visible’ (which happens when a user clicks ‘view’), and takes around 20-30s for the download to complete…
However, this seems like a long time and so I’m thinking of making the section visible, 1x1 pixel, in that way the data starts to download, and only when the data download is complete, the ‘view’ button is activated and allows the user to click through…
The issue is, I’m not sure if this works as I’m struggling to write the condition since I cannot find something along the lines of… ‘once section X completes loading’… Or might be best I simply add a 30s timer to the button, so the user can only click after 30s?
Any suggestions would be super helpful! Thanks in advance.
You can think about where the data is coming from and where it is being stored/displayed and have a general sense of the number of results, at at minimum more than ‘is empty’.
In the dynamic expression editor, you can choose ‘is empty’, ‘isn’t empty’, or on lists choose :count and understand if the data has been fetched and retrieved yet.
Great idea! One small problem, the data is presented in a ‘nested’ repeating group so referencing the cells for an ‘is empty’ or ‘count’ doesn’t seem possible? Hmmm…
There is probably a way to do it
Just spitballing ideas hear, but could you;
Add a popup on your page that’s never displayed to a user
Within the popup, add an input field
Create a way to populate the input field with your request results. If it’s a list of texts, just reference the last item within that list
Create a workflow based on the ‘do when condition’ in true trigger. Have this workflow only run when the inputs value is not empty, in which case, you could then display the button
Hope this can be helpful.
Hey @lachlankirkwood1 thanks for suggestion, really appreciate it. Tried it, but, again struggled to reference the results since they’re derived from a nested repeating group. Think for now I’ll have the section ‘visible’ with 1x1 max pixel width and height - that way the data will load - and have a 30s timer on the button. After the 30s, the section will ‘hide’, the button will become clickable, and once the user clicks through, the data should have (hopefully) loaded… More often than not it takes less than 20s so think sufficient enough time…
Thank you both for the suggestions again, and if anyone else has suggestions on how to reference elements within a nested group, please do share.
This topic was automatically closed after 70 days. New replies are no longer allowed.