stephiesmith Posted May 31, 2001 Posted May 31, 2001 I need a script where the user Enters the Find Mode, goes to a field called MONTH and it pauses, allowing the user to select the month from the pop-up menu for the records that he wants in his report. He will do this for up to 2 different months and then the report will continue. I am using the "new record request" for the multiple find but I'm doing something wrong because when I run the script and select MAY and JUNE, only records for MAY come up. I've tried various combinations and now I don't even know what I've done--but regardless, just May records comes up every time, and there ARE June records. Can anyone out there give me the steps in the proper order? Thanks!
JPaul Posted May 31, 2001 Posted May 31, 2001 quote: Originally posted by Stephie Smith: I need a script where the user Enters the Find Mode, goes to a field called MONTH and it pauses, allowing the user to select the month from the pop-up menu for the records that he wants in his report. He will do this for up to 2 different months and then the report will continue. I am using the "new record request" for the multiple find but I'm doing something wrong because when I run the script and select MAY and JUNE, only records for MAY come up. I've tried various combinations and now I don't even know what I've done--but regardless, just May records comes up every time, and there ARE June records. Can anyone out there give me the steps in the proper order? Thanks! Define a global field g_month In your script set the g_month as follow: g_month=MONTH (first selected) & "..." & MONTH (second selected) enter find mode set your MONTH field = g_month perform the search (obviously MONTH must be a number field, to work) Regards [ May 31, 2001: Message edited by: JPaul ]
stephiesmith Posted May 31, 2001 Author Posted May 31, 2001 Chuck, I go to the proper layout and the field "Month" Enter find mode (pause)[and it allows me to click on the pop-up menu to select May and then I click continue to continue the script} New Record/Request [and I click on the same pop-up menu to select June and click continue] Perform Find It only finds May records. Can you help? Thanks,
BobWeaver Posted June 1, 2001 Posted June 1, 2001 Did you make sure that the "restore find requests" option is UN-checked in both the "Enter Find mode" step and the final "Perform Find" step? Also --although I doubt if this is the problem--after the "New Record/Request" step it's possible that you may have to add a "Go to Record/Request [last]" step to make sure that you're not overwriting the previous month value.
stephiesmith Posted June 1, 2001 Author Posted June 1, 2001 Thanks Bob, I did check to make sure that "restore find request" is not checked. I don't think I'm overwriting the first request because I keep getting back the records from the first request, though the second request is ignored. (One time, though, while fooling around, I got back the records from only the 2nd request, but I had tried so many things by then that I don't know what I did!) I did do a workaround using a number field, but really would like to be able to use the month field instead. It would just make it easier for everyone...including ME!
BobWeaver Posted June 1, 2001 Posted June 1, 2001 If you want to email me your file, I could have a look at it.
stephiesmith Posted June 1, 2001 Author Posted June 1, 2001 Bob, That's very kind of you, but it's a many-to-many 4-file relationship, including the join file, and it's already populated with proprietary information(employee salaries, labor rates, contract amounts, etc). I'd have to change all the info or clone the files and add new records, etc., and I don't even have them at home, which is where I am now. But just so that no one misunderstands, the script is in the join file and the fields, finds, layouts, etc., are all in that join file, too, so the problem doesn't have anything to do with that. The rest of the script works fine and I can do one find or the other, but just am not getting the multiple find steps scripted correctly.
Chuck Posted June 1, 2001 Posted June 1, 2001 Can you give us the entire script that handles this? Is the user selecting the two months from two fields or from the same field? Chuck
BobWeaver Posted June 2, 2001 Posted June 2, 2001 In any event, it must be something relatively fundamental that is somehow being missed, because what you are trying to do is fairly straightforward. Does this work if you do it completely manually? That is, go to find mode select a month, add a new request, pick a second month, and then perform the find. If it works manually, then there is a problem in the script. If you have a problem with manual operation, then you could have some other more basic problem with your data or field definitions.
stephiesmith Posted June 3, 2001 Author Posted June 3, 2001 Bob, You'll be laughing at me when you see (below) just how simple it was, but that's okay because I'm laughing too. As it turned out, all I needed was to use the Pause/Resume Script step just before performing the Find. That was the only thing missing, but I guess I have never used that step because I didn't realize what it was for. I saw the script step in someone else's script and a light went on, even though they weren't doing the same thing I was trying to do. That's what's so great about these groups. SO, here it is... Go to field [month] Enter find mode (pause) New Record/Request Go to field [month] Pause/Resume Script [] Perform Find
Recommended Posts
This topic is 8578 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