Hi,
I have a items in my database which have a timestamp.
I have a repeating group and I want to filter items to show in that group, only if a certain time period has passed since they have been ‘marked’.
So if an item in the database was ‘marked’ at 2pm on a Monday, and the time filter in the repeating group was only to show these items after 24 hours as passed, that item would only be visible at 2pm on Tuesday.
How can I apply conditions to filter this within the repeating group?
Thanks.
One way to do this would be to have 2 custom states where the repeating group’s date search happens; one for the start time, and one for the end time.
So then the data can be data after the start time, but before the end time.
For simplicity, you can make these 2 things inputs.
They can default to the year 1970 and 2200 to capture everything before and after.
The user can adjust these setting to narrow down the timeframe where they want the data.
Hope that makes sense!
Thanks! However I’m trying to find the right expression to basically say:
Show only items when:
“Date stamp on item is more than X time period away from the current date/time”
So X time period could be 24 hours.
The repeating group would then only show the items where the date stamp on the item is more than 24 hours ago.
Here’s my attempt so far, but can’t find the right expression to make it work:
Thanks!
Okay that’s a cool idea. If it’s always going to be based on the current date/time:
Maybe this is a little over complicated and there’s an easier way, but here’s what comes to mind.
The user can control the range like you say, so lets call that that Date Input
We can take Current Time
- Date Input
= Range Start.
Current Time
+ Date Input
= Range End.
You can use my logic above for the search where you search for things made after the Date Start
and before Date End.
And if you want not always have it on the current date/time you can use the same system but add another component. If this does not make sense please let me know, I’m pretty sure you can get this working!
Try Whatdate < current time - 24 hours ?
Oh.
So then you just reverse my logic, and search for things Before the start date. After the end date.
Do a search for
filtered:
Advance
This Phrases's whateverTime
<
current data/time
+hours:
-24
Looks like the first approach I’d take, did you try this?
This topic was automatically closed after 70 days. New replies are no longer allowed.