2 Replies Latest reply on Jul 12, 2011 8:31 AM by aammondd

    Set Variable is setting variable to first record in find

    dennizzlegbizzle

      Title

      Set Variable is setting variable to first record in find

      Post

      I have a script that creates a record of the order id called $orderID. The issue is, it randomly is setting the variable to the first orderID in the found set. Not the current record I am performing the script from.

      Am I crazy?


      Thanks,

        • 1. Re: Set Variable is setting variable to first record in find
          philmodjunk

          Can't tell from here. Wink

          Might help to post your script. Also, check for any script triggers that might kick in during your script's execution and move the focus to the first record. If you have FileMaker Advanced, you can enable the script debugger and run your script a few times while watching it execute step by step as this will show you any such triggers performing scripts should they be a factor here.

          To post a script to the forum:

          1. You can upload a screen shot of your script by clicking the edit link to your original message and uploading it there
          2. You can upload a screen shot to a file share site and post the download link to a new response you post here.
          3. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF.
          4. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
          5. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional look to your script.
          • 2. Re: Set Variable is setting variable to first record in find
            aammondd

            A little more context would be helpful.

            Its possible that the table occurance reference being used to set the variable is different than that of the current record.

            If you could post your script steps and how its being executed it would be helpful.

            If you can print the script to a PDF file you can then select the text and copy/paste it. (May require copy and past to a text file first to remove formatting)