Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scripted Found Date Range

Featured Replies

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.

See if this helps:

http://www.fmforums.com/forum/showpost.php?post/214185/

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.

I'm afraid that won't work, but this will:

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

  • Author

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!

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.