how can I find all the records been created in last day from today, every day I need to show a list for all the records
created by users last day.
what date, time or timestamp data do you have in the table to work with?
Scripted finds can use today's date or the current timestamp to calculate criteria used for finding such records.
Scripted Find Examples
I’m using timestamp data
Did you try using one of the scripted find examples for which I posted a link?
How do you want to define "all the records created by users last day"?
If today is Feb 1, Do you want to find all records where the timestamp shows Jan 31?
Or do you want to show all records created in the past 24 hours? Given a timestamp that records the date and time at the time the record is created, both options are possible, the only difference is the script.
Here's an example of a script that finds all records with the previous day's date:
Go To layout [Specify a layout based on the table being searched]
Enter Find Mode [ ]
Set Field [ YourTable::yourtimestampField ; Get ( CurrentDate ) - 1 ]
Set Error Capture [on]
Perform Find [ ]
If the set field step used: "<=" & Get ( CurrentDate ) -1
You'd find all records created on or before the previous day.
Get ( CurrentTimestamp ) - 24*3600 & "..." & Get ( CurrentTimeStamp )
will find all records created in the past 24 hours. (3600 seconds to an hour, 24 hours to a day).
This is exactly what I was looking for and the approach I was thinking of taking. Thanks for sharing this.
Retrieving data ...