Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

script multiple finds of same field

Featured Replies

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!

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 ]

  • Author

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,

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.

  • Author

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!

If you want to email me your file, I could have a look at it.

  • Author

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.

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

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.

  • Author

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.