Jump 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.

Finding date ranges based on global date search fields

Featured Replies

Hi there!

I've been going crazy trying to find a solution for this one.

I have a database with travel information (arrival and departure dates; resp. ArrDate and DepDate). I have created 2 global search fields (StartDate and EndDate) with a calendar attached to it for easy input, and would now like to perform a search for e.g. all records where ArrDate= StartDate ... EndDate.

I had written a script storing the values of StartDate and EndDate in variables and then setting field ArrDate value to $StartDate...$EndDate, but this doesn't work.

I've also tried by referring to StartDate and EndDate fields directly, but that doesn't seem to work either. The only thing that works so far is doing a manual find and entering the criteria by hand in the ArrDate field directly.

HELP!!! :)

IF they are indeed global fields, it should work with

Enter Find Mode []

Set Field [ ArrDate; gStartDate & "..." & gEndDate ]

Perform Find []

  • Author

Thanks John!

This was a really silly error on my part: I simply forgot to concatenate the search terms (forgot to put the ... between & "" &). :)

Never again!!! (I hope!)

Hey, thanks for discussing this 'cause it's very close to what I need to do.

O.K., now suppose it's a number range that I want to find and the fields are validated to be number only?

How would I script a find for this?

I've got two global fields set up, one is Start_g and the other is End_g; the globals correspond with regular number fields with validation as I stated. Now I want to be able to find all records with Start greater than Start_g and End less than End_g.

Thanks again.

Edited by Guest

Oh, gee, nevermind. 'Works just the same, or at least your solution is working so far.

Thanks!

Take a look at the Online Help for Finding ranges of information Link

HTH

Lee

  • 1 year later...
  • Newbies

Enter Find Mode []

Set Field [ ArrDate; gStartDate & "..." & gEndDate ]

Perform Find []

I am trying to run this script with web publishing. It works just fine in the client, but when I get online it does nothing.

Any ideas why it would be doing that, or do I need to script it differently for the web?

Thanks,

Lhogan

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.