June 2, 200817 yr 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!!! :)
June 2, 200817 yr IF they are indeed global fields, it should work with Enter Find Mode [] Set Field [ ArrDate; gStartDate & "..." & gEndDate ] Perform Find []
June 2, 200817 yr 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!)
June 5, 200817 yr 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 June 5, 200817 yr by Guest
June 5, 200817 yr Oh, gee, nevermind. 'Works just the same, or at least your solution is working so far. Thanks!
February 18, 201015 yr 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