Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4297 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!!

Posted

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?

Posted

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

  • Like 1
  • Newbies
Posted

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.

Posted

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

  • Like 1
  • Newbies
Posted

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!

Posted

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

Posted

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

This topic is 4297 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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