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

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

Recommended Posts

Posted

I am trying to create a script that will report when a record has been modified, and then display those results in another layout. So far I have everything working the way I want it to, with one exception. I want the script to automatically perform a search and display records that are modified, starting with today's date through seven days prior.

I know I want to search a date range using the ... command, but where I'm running into problems is with current date minus the 7 days part of the search script.

I can find records easily using //...1/21/08 in the record modified field(Using today's date as the current date)

What I want the script to automatically enter is todays date, and then put whatever date was 7 days prior into the second date range automatically.

Sorry if the wording is a little vague, I'll try to clarify if you guys have any questions.

Posted (edited)

All that does for me is get the current date, minus 7 days. i.e. 1/31/08-7 days=1/24/08(I specified the 7 part.) I need it to actually display the calculated result as the search criteria i.e. 1/31/08...1/24/08.

I have a feeling I'm very close to being able to do this, but I haven't been using Filemaker that for that long. I have the correct result (7 days prior to todays date) but now I need it to actually put that date into the range.

Basically, I need the result of that calculated field to display;

"Get ( CurrentDate )" "..." & "Get( CurrentDate ) - 7"

but when I do that I am getting an operator error

Edited by Guest
Posted (edited)

I don't see why you need a range. Unless you have records that have been modified in the future, I would think that finding records whose modification date is equal to or greater than 7 days ago should be quite sufficient. It seems you have missed the comparison operator in the example (which needs to be reversed to suit your need):)

"≥" & Get ( CurrentDate ) - 7

Or, if you insist:

Get ( CurrentDate ) - 7 & ".." & Get ( CurrentDate )

EDIT:

Easy with the quotation marks - you only need them for literal text strings.

Edited by Guest

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