Newbies Tarnking Posted March 6, 2003 Newbies Posted March 6, 2003 Hope some of the smart people here can help with my newbie question. I'm trying to imagine a "show all records within date range" script that does not use 'start' and 'end' date fields but is run off an adjacent value list popup menu of each month of the year. A user could choose JUNE 2003 from the popup, for instance, and then hit the script button which would show all records from that month in the destination layout. Can't quite see how to insert the month into the script (Told you I was a newbie). Thanks all for any help.
willi Posted March 6, 2003 Posted March 6, 2003 Hi, you can extract the month from the popup (left, right and middle) and set it to a search-date function in the script. Willi
Newbies Tarnking Posted March 11, 2003 Author Newbies Posted March 11, 2003 Thanks Willi. I've put the output from my popup (which appears in the form "03/2003", for example) into a calc field that displays "01/03/2003...31/03/2003" (european format) just fine, then attempts (unsuccessfully) to insert this into the Find. I'm trying to do this from my master DB which is a client table. The field that I'm trying to insert into is a reservations 'begin date' in a related reservations DB. If I type the date range manually into the date field from the related file and do the find it works OK. It's the syntax of the script that I'm missing. Here's what I have now: Set field ["gdaterange", MonthValueList"] Enter Find Mode[] Set field ("reservations::begindate", "gdaterange") Perform Find[] Go to Layout ["Monthly Report"] What is wrong with this picture?
willi Posted March 11, 2003 Posted March 11, 2003 Hi, on the fly: you need a conversion from date to text for the "01/03/2003...31/03/2003". Willi
RussBaker Posted March 12, 2003 Posted March 12, 2003 Assuming that "01/03/2003...31/03/2003" is the contents of your gdaterange field, leave it as text but you will need to use the Insert Calculated Result function instead of Set Field. Set Field requires the argument to be in the format of the destination field, so it won't accept things like "<" or "...". This is a "gotcha" applicable to date and time fields. The field must be on the layout for Insert Calculated Result to work.
Recommended Posts
This topic is 7931 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 accountSign in
Already have an account? Sign in here.
Sign In Now