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.

script for omitting more than one parameter

Featured Replies

  • Newbies

Hi y'all,

I am having trouble with a script.

I need to omit a lot of things but this script just omits the 90 Closure and then leaves 03 Dead and 02 Hold in.

I am obviously doing this wrong.

I tried doing "90 Closure" or "03 Dead" or "02 Hold" but that didn't work. Is there a way to do this that will work?

post-108279-0-09001100-1361324524_thumb.

 

Thanks!!

Hi Rommms, welcome to FMForums!

Would you explain exactly what you want to accomplish? Your script doesn't make that clear. The constrain isn't doing anything. I suspect you want a loop or Replace Field Contents[] instead. Also, what criteria is in your Perform find?

I think you need to 'enter find mode' before each 'set field' - otherwise, the constrain has nothing to work on (as LaRetta says above) because you are in browse mode once you performed the first find.

 

 

hth,

Martie

  • Author
  • Newbies

I need to find all records that are checked between store number 0001-5999 and 9300-9998 then omit any that have project_status_code |projectType|= nothing, 00, 02, 03, or 90...

 

I would probably like a loop but not sure how the syntax should be or where to put it. Should I use a while loop?

If I enter find mode each time I omit, will it remember the previous find mode parameters, or is that what the while loop is for?

 

How do I do something like this AND statement for the omit? I couldn't figure out where to add the AND. If I could put an OR in there then could I omit all the "nothing", "00", "02", "03", or "90"?

 

thanks!

post-108279-0-68758400-1361378988_thumb.

You need to use multiple find requests similar to:

Enter Find Mode [ uncheck pause ]

Set field [ StoreHome::Store ; "0001..5999" ]

New Record/Request

Set field [ StoreHome::Store ; "9300..9998" ]

New Record/Request

Set Field [ StoreHome::ProjectStatus ; "=" ]

Omit Record

New Record/Request

Set Field [ StoreHome::ProjectStatus ; "20" ]

Omit Record

... Keep adding new request and then

Set Error Capture [ on ]

Perform Find[]

... Add process if no records found here

  • Author
  • Newbies

Hi Again,

so that worked great except the Find store numbers are allowing letters in there as well. I have some that are 9930a, 9930b, 9930c,9930d

that are not supposed to be in there. Is there an operator that says ONLY "0001..5999" or "9300..9998". I tried putting quotes around each number but that didn't work.

 

I looked at this but couldn't find anything specific: http://www.filemaker.com/help/html/create_db.8.37.html

 

could I use something like the plus symbol?

  • To require words: Type the plus symbol (+) before the words that must be in the search results.
  • To exclude words: Type the minus symbol (-) before words you don't want in the search results.
  • To search with a wildcard: Type an asterisk (*) after the initial letters of a word to search for all words or terms that begin with those letters.
  • To search using synonyms: Type a tilde (~) before a word to search for answers containing that word as well as synonyms for the word.

Thanks!

It works fine for me.  The field should be text (although it would work just as well as a number for the purpose of this find).  But 0001 isn't a number so you are best to leave the field type as text.  Please see attached and see if it helps - I can find "0001..9221".  If you want something different please let me know.

 

As for advanced search, yes there are examples around but really 99% of everything you will need can be accomplished easily with FM standard finds once you learn how to write the scripts (which you are doing).  :laugh2:

 

 

Find.zip

"I have some that are 9930a, 9930b, 9930c,9930d that are not supposed to be in there."

 

Oh, are you saying you want to omit records if they have alpha in or after them?  If so you would need to enter multiple additional find requests, omitting A then omitting B etc.  Easier to create a calculation which flags records with text something like:

Let ( trueNum = Filter ( Number ; 1234567890 ) ; Length ( Number ) = Length ( trueNum ) )

Then your find would be the range plus also set this calculation with a 1 to find records with only numbers in the field.  Anyway I hope this moves you forward.

Create an account or sign in to comment

Important Information

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

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.