I have a repeating group, which i have set its data source to “Search for Item_list”. I have also added a constraint with “Created date > Current date/time +(minutes): -10”. This constraint enables me to only show Items that were only created in the past 10mins. This works great
Let’s create a scenario:
The Current time is 12:10, and 2 Items were created at 12:04 and 12:06. The list immediately shows these Items in the Repeating group. But here is my challenge.
As soon as the time changes to 12:11 and above, these items still remain on the screen without disappearing. I will then have to manually refresh the screen for the list to return an empty list for me.
How can I make this list automatically remove Items when its time frame has passed without refreshing screen
A date object is static… (it doesn’t update in real time)…
So Current Date/Time will be the exact time that the date is read (either on page load, or in a search or a workflow etc.), but it won’t update in real-time.
If you want it to update in real time, you’ll need to re-establish the current date/time every second…
There are multiple forum posts about how to do this, so search the forum for more details, but you basically have 3 options:
- Run a workflow every second to update the time in a custom state or group datasource
- Use some custom JavaScript that sets the time every second
- Check out one of the various free plugins that does the same thing
1 Like
@adamhholmes Thanks for your response. Can runing a workflow every second overload my server?
No these are all client-side actions…
@adamhholmes Thank you so much for all you assistance.
So these are my steps now.
- Added the Repeating Group into a Group, and set the “Type of Content” to “date”, and the “Data source” to “Current data/time”.
- I created a workflow, “Do every 1 second”, and set an action “Display data in Group”
- Chose the right group in the element
- Set Data to display to "current date/time
- On my Reapeating group, I replaced anywhere i had “Current date/time” constraint to “Parent Group’s Date”
Its working out great for now. Thanks once more
1 Like