Jump 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.

Multiple finds in a script

Featured Replies

Is it possible to script multiple finds. When I use "Enter Find Mode[]" in my script it forgets about the previous "Enter Find Mode[]" and only runs the last request.

I used variables in my script and so also use "Set Field" after each "Enter Find Mode[]"

Thank you.

Look into the Constrain Found Set and Extend Found Set script steps.

Alternatively what you want might be achieved with multiple find requests - these allow OR searches to be performed. Say you need to find people who lived in City = "New York" or "Sydney" or "London"...

Enter Find Mode []

Set Field[ City ; "New York" ]

New Record/Request

Set Field[ City ; "Sydney" ]

New Record/Request

Set Field[ City ; "London" ]

Perform Find []

  • Author

Thank you very much for the input

Regards

Phillip

  • 1 month later...

is this "or" only or do the results return results from all 3?

dont quite follow your question...

This will return any records with "New York", "Sydney" or "London" n the city field.

Let me go into more detail, every morning i need to run a search to get the following.

ITM Status

CAT Status

plus about 40 other fields.

Currently to limit the records I pull it into Excell and edit it like this.

ITEM STATUS = A,N,O but I have to manually remove all D's

CAT STATUS = C,Y but not X

So what I was thinking was like this:

Enter Find Mode []

Set Field[ ITM Status ; "A" ]

New Record/Request

Set Field[ ITM Status ; "O" ]

New Record/Request

Set Field[ ITM Status ; "N" ]

New Record/Request

Set Field[ CAT Status ; "Y" ]

New Record/Request

Set Field[ CAT Status ; "O" ]

New Record/Request

Set Field[ CAT Status ; "C" ]

Perform Find []

Would this give me similar results without having to do all the editing in Excel?

Well in this case, if you have a record with an ITM Status of "D" but also a CAT Status of "Y", then it would show the record since it meets the CAT Status criteria.

Good point!

I'm thinking that i would have to get it to do one set (CAT) and then the second set from the results? of the Cat search?

Well I am not sure what kind of result you are looking for...

Do you want the results to show that before mentioned record or not? If not, you can do a constrain.

Enter Find Mode []

Set Field[ ITM Status ; "A" ]

New Record/Request

Set Field[ ITM Status ; "O" ]

New Record/Request

Set Field[ ITM Status ; "N" ]

Perform Find []

Enter Find Mode []

Set Field[ CAT Status ; "Y" ]

New Record/Request

Set Field[ CAT Status ; "O" ]

New Record/Request

Set Field[ CAT Status ; "C" ]

Constrain Found Set []

Or you can just omit the ones that you dont want.

Enter Find Mode []

Set Field[ ITM Status ; "A" ]

New Record/Request

Set Field[ ITM Status ; "O" ]

New Record/Request

Set Field[ ITM Status ; "N" ]

New Record/Request

Set Field[ CAT Status ; "X" ]

Omit Record

Perform Find []

Mr. Vodka thanks again for your help.

1) No i do not want a CAT=Y, ITM=D result

2)Your script looks like it will do exactly what I need, but I can't figure out how to set the the field to do the following.

( I don't have that field directly in the table i'm using so it actually comes out

Set Field[ ???:CAT Status ; "Y" ]

How do i set it?

3)What would you recommend as a resource to learn scripting?

I do not have any local offerings, and cannot get sent to any of the courses. I've learned a lot on my own - but the scripting is still throwing me off.

I'm starting to feel bad that I am taking so much from these forums.

Its okay. We are here to help. I would try the tutorials and get some of the books. Geoff's "The Missing Manual" is good for beginners. Ray's book is always a good resource as well...

I am not sure about what you mean that you dont have that field in the table.

  • 3 weeks later...

I have it all set up , but i don't know how to set up the " A" in the following

Set Field[ ITM Status ; "A" ]

as for it not being there I mean that it is in a separate table

Hi alphanitrate,

Sorry to be jumping in late on this, but I'm confused as to what you are trying to do.

Let me go into more detail, every morning i need to run a search to get the following.

ITM Status

CAT Status

plus about 40 other fields.

Currently to limit the records I pull it into Excell and edit it like this.

ITEM STATUS = A,N,O but I have to manually remove all D's

CAT STATUS = C,Y but not X

Are these hypotetical values, or actual values?

Are you really wanting them to be Hard Coded, or be flexible so that you can change the criteria each time you run the script?

Assuming they are Real Values, and to be Hard Coded, why not just perform a find for Item Status "D", and Omit (same for Cat Status "X" and Omit.

Lee

Mr. Vodka - how do I set the value for the Set field ( ie. A")

Lee - thanks for you help also..

Are these hypotetical values, or actual values?

Are you really wanting them to be Hard Coded, or be flexible so that you can change the criteria each time you run the script?

Assuming they are Real Values, and to be Hard Coded, why not just perform a find for Item Status "D", and Omit (same for Cat Status "X" and Omit.

Lee

These are actual values.

Assuming they are Real Values, and to be Hard Coded, why not just perform a find for Item Status "D", and Omit (same for Cat Status "X" and Omit.

I don't know how exactly to do it - like mentioned in this post (http://fmforums.com/forum/showtopic.php?tid/193440/tp/1/) i'm new, self taught and doing a large database for a company.

On the plus side I'm 25 minutes away from the "Calculation webinar file maker is putting out.

Select the Set Field script step.

Hit the "Specify" button next to the wording 'Specify target field'

Choose your target field.

Hit the "Specify" button next to the wording 'Calculated Result'

Type in "A"

try something like this

For all but D

Enter Find Mode [ ]

Set Field [ alphanitrate::ITEM STATUS; "D" ]

Perform Find [ ]

Show Omitted Only

For all but X

Enter Find Mode [ ]

Set Field [ alphanitrate::CAT STATUS; "X" ]

Perform Find [ ]

Show Omitted Only

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.