kenneth2k1 Posted September 12, 2001 Posted September 12, 2001 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?
kenneth2k1 Posted September 12, 2001 Author Posted September 12, 2001 When I wrote this post, I had thought the tabs and spacing would carry over, sorry....
Kurt Knippel Posted September 12, 2001 Posted September 12, 2001 You are not telling it to goto the next record. Use Goto Record/Request/Page [Next, Exit After Last] and you should be fine.
kenneth2k1 Posted September 12, 2001 Author Posted September 12, 2001 Yup, youre right! Thanks for checking my work. Many thanks, ken
kenneth2k1 Posted September 13, 2001 Author Posted September 13, 2001 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.
LiveOak Posted September 14, 2001 Posted September 14, 2001 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
kenneth2k1 Posted September 14, 2001 Author Posted September 14, 2001 Ok, since were on the subject... Im trying to write this script and I have this part included: If [
Vaughan Posted September 14, 2001 Posted September 14, 2001 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.
kenneth2k1 Posted September 14, 2001 Author Posted September 14, 2001 Is everything else ok??? Thanks for your feedback
Recommended Posts
This topic is 8475 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