September 12, 200124 yr Ok, Ive made a script for a procedure described in the post, "CHECKING FIELD FOR ENTRY." I couldn't do it the way vaughan had showed me (sorry). So here is what I made: Perform Find [Restore find requests] Loop If [is Empty (Campaign1)] Insert Text [select, "Campaign1","Auto"] Insert Current Date [select, "Campaign1 Date"] Insert Text [select, "Letters1","Intro"] Insert Current Date [select, "Letters P Date1"] Else If [isEmpty (Campaign4)] Insert Text [select, "Campaign2","Auto"] Insert Current Date [select, "Campaign2 Date"] Insert Text [select, "Letters1.1","Intro"] Insert Current Date [select, "Letters P Date 1.1"] End If End If End Loop When I perform this script, it will insert the desired text into BOTH sets of fields per IF function on ONE record (or so it appears), instead of inserting it once per record, then loop to the next record. Also, the Apple Button symbol replaces the pointer and a dot flashes at the bottom right of the symbol. Is there something wrong with this script? What should I change to make it work the way I want?
September 12, 200124 yr Author When I wrote this post, I had thought the tabs and spacing would carry over, sorry....
September 12, 200124 yr You are not telling it to goto the next record. Use Goto Record/Request/Page [Next, Exit After Last] and you should be fine.
September 13, 200124 yr Author Should I have put it before or after the "End Loop"? I have it before the end loop, and it seems to be working right, but I dont know if thats the correct placement.
September 14, 200124 yr If it is after the End Loop, you will never reach it. It must be before the end loop. The idea is that the loop proceeds through all the records performing the Inserts, then exits after the last record has been processed. You might also want to place a "Go to Record/Request/Page (first)" before the Loop statement. It is not strictly necessary in this case, but it is a good habit to get into. -bd
September 14, 200124 yr Author Ok, since were on the subject... Im trying to write this script and I have this part included: If [
September 14, 200124 yr Use Status(CurrentDate) instead of Today. The Today function only calculates at the start of each session when the database is opened. So if the file is left open for a week then the calculations that use Today will be wrong. FM Inc recommend that if the Today function is used then the file should be closed and reopened once a day, like just after midnight. The Status(CurrentDate) function re-calculates itself whenever it is used.
Create an account or sign in to comment