Jump to content

how to create a search date script?


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

Recommended Posts

Hey,

I have created a find page with one of the fields being a date field. Now, whenever someone wants to find a record, they will be sent to this page whereby they can specify the date, name etc... now, what happens is that is a person wants to search for a range of dates, he will have to go to the date field and type MM/DD/YY...MM/DD/YY...

My next step now is to create 2 more date fields(DateFrom and DateTo). So when a person is going to search for a range of dates, he will just have to key in the 2 dates(from and to) into the respective fields and then click on the Search button to extract the range of dates.

Hopefully this is clear enough to explain my problems. Thanks.

Link to comment
Share on other sites

Jeremy,

Thanks for the reply.

I tried the script, it doesn't seem to work. In troubleshooting, I actually, took out the Perform Find script, to see if it does actually inserted the datefrom, "..." and dateto into the date field. But in fact it didnot insert the range of dates into it. Any ideas?

Thanks again.

Henry

Link to comment
Share on other sites

Unfortunately, the set field approach doesn't work. Yafreax has the correct approach. Maker sure: 1) the start and end data fields are global fields and 2) the Date field appears on the layout you are on when the script is run.

Enter Find Mode () <--- make sure restore is not checked

Set Field [ Date, gDateStart ]

Insert Text [ Date, "

Link to comment
Share on other sites

This topic is 7764 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
 Share

×
×
  • Create New...

Important Information

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