Is there any current working method of updating a repeating group without a hard refresh?
I have a BDK wrapped mobile app and users often leave the app open on a tablet. When left open, there is no graceful way of triggering a refresh of data other than a full refresh of the page (which is not ideal - it’s slow and you get an interstitial loader)
There are numerous solutions on the forums, most of which use a “cache buster” date stored in a state to “refresh” the query or using clear > set list with a pause. I’m not successfully getting any of these methods to work.
Anyone have a working method, or a suggestion of how to refresh data reliably in a BDK wrapped app?
I don’t have any experience with the BDK wrapper, but I was thinking of something that could work.
Other than the AI answers that talk about event listeners and workflows that run every x seconds or whatever, and on and on. Sounds like that could get a little crazy cost-wise.
I was thinking maybe you could have a button the user could click to update just the repeating group manually? ‘Update Data’ or something like that?
Maybe have it tied to a custom state so the button would only show every so often?
You said the users sometimes just leave the app open on their tablet, so not sure if you mean the screen goes dark or not. If the screen sleeps, this would cause a problem with the custom state. Sounds like you have some type of employee app for workers out in the field or something.
Since you can’t use RIBs like a big commercial app, this might be an easy solution.
Not sure if it will work. But, like most times, it’s an idea that might spark another idea. It’s that whole creative thinking thing, I guess.
Anyway, the button would just reload the repeating group and not the whole page
Thanks for the thoughtful response and ideas! I really appreciate it.
I’m actually trying a button right now (I figured, like you, this was the least fancy solution and if I could get that working, I could get something better working). I’m also testing in the browser (no BDK, just a computer), and not leaving it sitting for as long as it might in a real use case.
I have a state that has a date of 01/01/2099 and the button basically adds a day to that date.
The repeating group is searching for all things where date is less than the value of my state.
I leave the browser open for 3-5 minutes, then hit the button…
…No change to the repeating group (which is outputting the time in minutes between a time and “now”).
AI is hallucinating some suggestions that sound good, but just don’t work.
I feel like I don’t understand something key about how repeating groups pull data, or how queries cache data, or missing some magic workflow item that would help.
Have you tried using the plugin Current Date/Time. This uses the device date and will update in relatime compared to the :currentdate which only updates on page load
I think the search would be based on the custom state, but you’re probably way smarter than me about that already.
Yes, I added a feature where a Merchant can create a digital loyalty card with points and prizes and all that. I ended up with 4 custom states just for that, and was thinking there could be a better way . I’m still working on it.
I hope you get things worked out so they work the way you want them.
Enjoy the rest of your day, and good luck. Glad we could get some ideas started.
Not when used in repeating groups. For example if you have it show things where :currentdate = X on a mobile device, wrapped which is not closed. When opened the next day it will show the old date.
Using the device current date was the way I was able to work around this issue.
Since part of what I’m outputting from the repeating group is time from x time to current date (and that’s what I was looking at to see if the whole thing is “working”), I’m wondering if I have two things going on: maybe the repeating group is refreshing, but it doesn’t look like it to me because my “time since” isn’t changing (which is just an on page calculation against current time).
In my latest test, I am storing the repeating group query in a state.
This thread and all the responses have given me a number of things to try, so I’m going to do a little more testing today and see if I can crack the nut!
I just wanted to pop back in here (in case anyone is searching in the future with a similar issue) to say that @dbom009 's solution about using the plugin Current Date / Time solved it.
I never really thought about it, but every one of my repeating groups that weren’t “refreshing” ultimately had a time component in the search. So it wasn’t really a matter of the repeating group not refreshing… but rather the date not refreshing.
All the other things I tried, including states/cache busters / etc, had absolutely no impact.