March 6, 200322 yr Newbies 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.
March 6, 200322 yr 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
March 11, 200322 yr Author Newbies 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?
March 11, 200322 yr Hi, on the fly: you need a conversion from date to text for the "01/03/2003...31/03/2003". Willi
March 12, 200322 yr 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.
Create an account or sign in to comment