April 27, 200520 yr 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
April 27, 200520 yr 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.
Create an account or sign in to comment