5 Replies Latest reply on Jul 8, 2010 9:39 AM by philmodjunk

    Set Field Problems Moving to Filemaker 10

    marketg

      Title

      Set Field Problems Moving to Filemaker 10

      Post

      I've been over and over this problem and am at a dead end. We just moved from FM7 to FM10 last week and I have run into a problem with a script that has a set field command in it. Below is what is going on:

      We have two databases (Invoice Items and Shipping Calculator). The both have a relation to each other based on an Invoice Number. In Filemaker 7 I was using a SET FIELD command in a script in the Invoice Items database to Set a field in the Shipping Calculator of the Quantity of an item purchased. (basically copy the quantity of the line item and then pasting that into the shipping calculator quantity to generate shipping cost). This has been working great for over 3 years. Since moving to Filemaker 10, the SET FIELD command no longer will pass the quantity to the Shipping Calculator.

      Any suggestions would be great.

      Thank You

        • 1. Re: Set Field Problems Moving to Filemaker 10
          philmodjunk

          Don't see how upgrading from Filemaker 7 to 10 would change that behavior. Even older versions of filemaker worked as you are expecting set field to work here.

          If these are two different database files linked via relationship, you might want to open Manage | External Data sources... and make sure that your relationship correctly links to the file you expect it to.

          • 2. Re: Set Field Problems Moving to Filemaker 10
            etripoli

            Are you using a Commit script step after the Set Field?  Do you have access to FM Advanced, to run the Script Debugger and Data Viewer?

            • 3. Re: Set Field Problems Moving to Filemaker 10
              marketg

              I agree, I don't understand how it is having problems. We are not using a Commit Script after the Set Field.

              New update, we have run across two more databases that are having the same problem, but both of those are using a Copy from database A and then Paste into database B. These worked well in FM7 and now do not work in FM10...

              Whew I'm stumped! Still working through it though.....

              We do not have FM Advanced, but are considering it now. Would this possible tell us the problem?

              • 4. Re: Set Field Problems Moving to Filemaker 10
                marketg

                Ok new update about what is going on.

                IF the script is running and finds only one record, the script works fine. If there are two or more records, the SET FIELD and COPY/PASTE features are not working..... boy this sounds strange.....

                So in my script, if there are two or more records it will not COPY the summary field, but if there is one record, it will COPY it.

                • 5. Re: Set Field Problems Moving to Filemaker 10
                  philmodjunk

                  With out examining your file or seeing a post of your script, it's pretty hard to see what might have gone wrong. Did you check the external data sources?

                  Copy and Paste are not the best approach here except for a very small handful of exceptions. One common gotcha with copy and paste steps is that they silently fail if the targeted field is not present on the current layout at the time the script executes. You can use parameters and variables to move data instead of copy/paste in almost all situations and these steps will not have this limitation.