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

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

Recommended Posts

Posted

I just need to be guided in the right direction on this one. I trying to create a script the will find records that have been created and or modified within a certain number of days. I would love it if the user could specify the number of days or a start date and end date.

Currently I have 3 fields that deal with the date, 2 are auto entered creation and modification. There is also 1 date field that is set when a record is assigned to be handled by a user.

While writing this I wondering if some sort of calculation field will be need to pick the most recent date from all 3 of those fields. But any other advice would be greatly appreciated.

grubachr

Posted

Since FM calculates and stores dates as an integer & "the number of days from 01/01/0001", this is actually fairly simple.

Set up a global number field so user can enter in "the number of days". Let's call it "NewField". If you want to show which records were modified within the "number of days", run this script -

Show All Records

Goto Record (first)

Loop

If [ Newfield ≤ ( Get ( CurrentDate ) - ModificationDateField ) ]

omit record

EndIf

Goto Record (next) [exit after last]

End Loop

So in other words, if the modification date is not within the number of days specified, omit the record.

You can calculate if it's within a number of years by basically dividing by 365.

This topic is 7152 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.