Jump to content
Sign in to follow this  
bruceiow

why is my date find script not constraining correctly?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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