We help IT Professionals succeed at work.

find record updated within two weeks

Hiroyuki Tamura
on
Medium Priority
245 Views
Last Modified: 2010-04-27
do you know how to create the script like that?
Comment
Watch Question

Assuming youi have a field called DateField that contains the date you want to compare, this will do it.

  Enter Find Mode [ ]
  Insert Calculated Result [ Table::DateField; ">=" & Get(CurrentDate) -14 ]
  Perform Find [ ]
Hiroyuki TamuraField Engineer

Author

Commented:
thank you, billmercer!

> Enter Find Mode [ ]
what should i find?

> Insert Calculated Result [ Table::DateField; ">=" & Get(CurrentDate) -14 ]
what should i set target field?

>Perform Find [ ]
what should i find? 1?

please let me know.
These are script steps. You don't specify the find, you let the script do it.

First you insert the Enter Find Mode step into a script.
Then the Insert Calculated Result,
and then the Perform Find.
Then you run the script to do the find.

The first step just puts FileMaker into Find mode.
The second step inserts the find criteria, which is the greater-than or equals operator, followed by a calculation that enters a date two weeks before today's date.
The third step actuall performs the find.

Hiroyuki TamuraField Engineer

Author

Commented:
Hiroyuki TamuraField Engineer

Author

Commented:
thank you, billmercer!

mhhh... still can't figure out...

after starting the script, it gets find mode...
what should i input in this case?
Hiroyuki TamuraField Engineer

Author

Commented:
sorry... do you have any sample file?
The problem is there are two different script steps, one is called Perform Find, the other is called Perform Find/Replace.
The one you want is the Perform Find without the replace.

It's very unfortunate that FileMaker decided to give them such similar names, because they do completely different things.
Also, you will want to uncheck the option to Pause on the Enter Find Mode script. See this example...
http://www.milleniumhandandshrimp.com/upload/two%20weeks.fp7

This is just a simple example, you will want to add more to the script to do things like switch to the correct layout, and possibly allow the date range to be modified.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Hiroyuki TamuraField Engineer

Author

Commented:
thank you, billmercer!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.