5 Replies Latest reply on Aug 23, 2015 7:28 AM by DrewTenenholz

    Insert fr Dev gets Error102

    wfgclapp

      FM Server14, Go14, ProA14

       

      I'm using Insert from Device to use iPhone6 camera to insert pic into a container field.

       

      The IFD script step returns Error 102, Field is Missing.

       

      I've used this in another solution, just fine. The field in the db looks fine, the script step looks fine.

       

      For kicks, I changed the Target Field to another container field except this container field has repetitions. Now it works.

       

      Wha??

       

      Tired of beating my head against a wall.

       

      If anyone has any thoughts of what to check, I've love to hear them! ;-)

       

      THanks.

        • 1. Re: Insert fr Dev gets Error102
          DrewTenenholz

          wfgclapp --

           

          The "Insert ..." family of script steps requires that the field be present on the layout when the step is called.  Since they basically do the same thing as you could do with by right-clicking in the field and choosing to insert content, make sure you can so that, then the script step should work.

           

          -- Drew Tenenholz

          • 2. Re: Insert fr Dev gets Error102
            wfgclapp

            That's got to be it! That would explain exactly what I'm seeing in what's working and what's not.

             

            Will try it next chance I get. Thank you!

             

            Martin Clapp

            Wood Fruitticher Food Service

            mclapp@woodfruitticher.com<mailto:mclapp@woodfruitticher.com>

            • 3. Re: Insert fr Dev gets Error102
              CarstenLevin

              Tge explanation given by Greg is forrest.

              try using the Get(LastError)  to track problems when something is not working + use the script debugger when the World is evil. As we all know it sometimes is 

              Assuming you are using Pro advanced

              • 4. Re: Insert fr Dev gets Error102
                wfgclapp

                DrewTenenholz wrote:

                 

                wfgclapp --

                 

                The "Insert ..." family of script steps requires that the field be present on the layout when the step is called.  Since they basically do the same thing as you could do with by right-clicking in the field and choosing to insert content, make sure you can so that, then the script step should work.

                 

                -- Drew Tenenholz

                Drew,

                 

                Yup, that's it. Man, thanks a ton. I kept asking myself, "Field is missing...from WHERE??". In hindsight, duh.

                 

                Much obliged.

                 

                Martin

                • 5. Re: Insert fr Dev gets Error102
                  DrewTenenholz

                  Martin --

                   

                  Glad I could help.  It's easy to forget that FileMaker always works from some context. 

                   

                  Some script steps interact with the layout objects (and thus we need to consider script triggers when  executing them), so they must be present on the layout.  That was your problem.

                   

                  However, other steps like Set Field may seem to operate without a context but when you think a little further, you realize that the execution of the step happens while FileMaker is on some layout, and so the relationship graph is certainly to be considered.  If you reset a layout context from one TO to a different TO (for the same table), but forget about the Set Field () step you already had in place, the script will seemingly grind to a near halt and/or throw errors because FileMaker cannot resolve the now 'damaged' field reference in the step.

                   

                  Even the relatively new Execute SQL() step has a context.  You are not tied to a layout, but you are tied to the relationship graph and the Table Occurrences on it.  There is no way to tell FileMaker to work on a Table, only Table Occurrences.  Even PHP and other web interaction technologies must go through the Table Occurrence.  Manage Database uses a specific TO when creating calculated fields as well.

                   

                  Back in the CWP/CDML (Custom web Publishing/Claris Dynamic Markup Language) days, there were discussions about using a reference to a somewhat 'magical' Layout (0), which was a sort of cheat to talk to the table without having to go through another layer, but those days a gone, and with good reason.

                   

                  -- Drew