Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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!!! :)

Posted

IF they are indeed global fields, it should work with

Enter Find Mode []

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

Perform Find []

Posted

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!)

Posted (edited)

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
  • 1 year later...
  • Newbies
Posted

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

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