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.

why is my date find script not constraining correctly?

Featured Replies

Hi All,

 

I have written a date search script to perform a search on a field called submittedDate. (this is a date field in a table called claim). I have a layout based on a table called person. Person is linked to Claim, claim.id = person.claimId.

 

I have also created an unrelated table with globalstartdate and globalenddate fields. I have created a layout based on this unrelated table and put two date pickers on that view and a button. The button runs a script that does the following:

 

Go to Layout ["MyClaimLayout"]

Enter Find Mode[]

Set Field [claim::submittedDate; GlobalDateFind::GlobalStartDate & "..." & GlobalDateFind::GlobalEndDate]

Set Field [claim::commital;0]

Perform Find[]

 

I run this and the between dates just isn't filtering. I have chosen 12/01/2015 to 13/01/2015 as my date range and a row from 01/01/2015 appears  :hmm: .

 

Have i done something wrong here?

 

Many thanks

your globals are date fields?

  • Author

Indeed, both are set as "date"

Is this a typo?  "...I have chosen 12/01/2015 to 13/01/2015...." or is this day/month/year format?

  • Author

no - My date range was from 12th Jan 15 to 13th Jan 15

and your system is set to "m/d/y"?  Check to see what format is being enforced in the File Options.

Go to Layout ["MyClaimLayout"]

Enter Find Mode[]

Set Field [claim::submittedDate; GlobalDateFind::GlobalStartDate & "..." & GlobalDateFind::GlobalEndDate]

Set Field [claim::commital;0]

Perform Find[]

 

That looks like it should work. Possible causes of failure:

  • "MyClaimLayout" is not a layout of the "claim" TO;
  • The searched field ("claim::submittedDate") is not a Date field;
  • The searched field contains invalid dates (search for ? to find these);
  • The searched field needs to be re-indexed.

Create an account or sign in to comment

Important Information

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

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.