11 Replies Latest reply on Sep 20, 2013 10:44 AM by philmodjunk






           Filemaker won't close this If script step because i don't have the syntax correct.

           I can't see why... It puts the cursor by my table and file name. I named them the same...

           Let (  GetValue ( TempEdi::TempEdi ; 1 ) ;

           PatternCount ( "ST ISA L11 LX MS2 SE" ;TempEdi::TempEdi )

        • 1. Re: Let

               Let lets you define variables, not field values. You need to use a script step (Set field, for instance) do set a field value, not a calculation function.

          • 2. Re: Let

                 In what script step are you using it?

                 What you show should return a number, either 0 if the contents of TempEDI is not present in the quoted text or 1 if it is. By itself, it will not put your cursor anywhere.

            • 3. Re: Let

                   Exit if

                   But there is something wrong with it because i can't close or ok the specify Calculation box to  proceed.

              • 4. Re: Let

                     The usual culprit is an extra ( or a missing ), but I see none in your expression.

                     What error message do you get when you click OK? What text is highlighted?

                • 5. Re: Let

                       A number, text constant, field name or "(" is expected here.

                       Then it puts the cursor on the two semi colons between the name of the table and the name of my field.

                  • 6. Re: Let

                         Well those are colons wink

                         but it looks like you have a space between the :: and the field name now that I look a bit closer.

                         It's easier/safer to add field references to your calculation by double clicking them in the list of fields in the top section of the specify calculation dialog. You have to be careful sometimes to first select the correct table occurrence name in the drop down, but at least the field reference's syntax will be added with correct syntax.

                    • 7. Re: Let

                           As David W. you aren't using Let() correctly at all. Any Let() statement requires at least one "=". Please review the help file: http://www.filemaker.com/12help/html/func_ref3.33.16.html#1028226

                      • 8. Re: Let

                             I know I was lost by Phil comments.   I believe the Let statement should be


                             Let ( A = GetValue ( TempEdi::TempEdi ; 1 ) ;

                             PatternCount ( "ST ISA L11 LX MS2 SE" ; A )


                             or something like this.

                             Please let me know if I am missing something. 

                        • 9. Re: Let

                               Good point guys. Just didn't see the obvious here.

                          • 10. Re: Let

                                 Just wanted to be sure I wasn't missing something.  It happens to the best of us.    

                                 I hope that don't mean the eye sight is going.cool

                            • 11. Re: Let

                                   More like a brain fuzzed out on insufficient sleep plus the nagging remains of a nasty sinus infection.