Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi

I'm not sure if this is a calculation situation, a script situation or both.

I need to find a set of records that is in a date range of "14 days prior to today... to today" on a daily basis and automated with a button/script.

In short - click a button and records with that date range would be found.

THANKS.

Posted

Something along these lines:

Enter Find Mode

Set field [ Table::Date field; Get (CurrentDate) & ".." & Get (CurrentDate) - 14 ]

Perform Find

That may be simplifying it a bit, but it's the basics.

Posted

Thanks.

I kept getting the "Need operater here" message at semicolon.

I had to change the semicolon to "&" and put a "(" and ")" at the both ends and it worked great

This is what I did with my table and date field inserted:

TABLE::DATE FIELD & (Get (CurrentDate) - 14 & ".." & Get (CurrentDate))

Thanks again!

Posted (edited)

The semicolon is a separator between the two options of the Set Field[] script step. First, you select the target field, i.e. which field you want to set (that would be TABLE::DATE FIELD). Next, you specify the calculated result - that would be ONLY THIS:

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

Note that you do NOT include the target field here, unless you want to keep the existing contents; for example, Set Field [ somefield ; somefield & "a" ] appends "a" to whatever is already in somefield.

In your case, when you enter Find mode, the field is initially empty (no criteria specified), so the reference does not actually do anything, but it still shouldn't be there. I don't see how the extra parentheses help either.

Edited by Guest

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