Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Finding dates in the last 30 days


This topic is 7002 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi all - hope you can help.

I'm creating a report in which I want the first step to be to perform a find on a date field to find all dates in the last 30 days. How do I set a find criteria that is effectively 'today...today-30'?

Thanks!

  • Newbies
Posted

Thanks for this - but I can't see how to apply it... Do I create one script step to set the field, then another to perform the find? Every way I've tried to enter this, FM throws up an error... sorry to be dumb, but can you explain how to create the script in FM7 or 8 in a bit more detail?

Many thanks!

Posted

Sure.

Allow User Abort [Off]

Set Error Capture [On]

Enter Find Mode [ ]

Set Field [dateField; "≥" & Get(CurrentDate) - 30] {first parameter is target field; second is calculation}

Perform Find []

If [not Get(FoundCount)]

Modify Last Find

Show Custom Dialog ["No records were found for the given date range."]

Show All Records

End If

Posted

I assume you meant GetAsText, since it is already a date. However, 7 auto-converts the expression, so GetAsText is superfluous.

This topic is 7002 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.