3 Replies Latest reply on Nov 11, 2014 3:25 PM by keywords

    Starter Solution


      Hello Gurus,


      Its my 20 days in filemaker...Im trying to make a new record while I'm on List view... I am trying to copy one of the script in starter solution the Invoices. "Trigger | Create Product in List" to put into my solution but its not working for me. Im scratching my head since yesterday.

      I have attached my sample file.

      Please help me to incorporate it to my solution.

      Thank y0u so much.


        • 1. Re: Starter Solution

          Hi Joy,


          on which Layout should we test, is it trial Web Main List ? There I filled all of the fields and clicked on the button and the record was added. Then I used the script debugger, nothing is executed. You test the value of $$PLATFORM, but you never set it's value as far as I can tell.

          • 2. Re: Starter Solution



            I got an email stating you replied, but the link does notwork .


            You're right in starting the name of your value with $$, this way it's global and is accessible in any script.


            You need to set this variable when the file is loaded. Create a script, lets say it is called OnOpen, that will be executed when the file starts. To know what platform the user is on, use Get(ApplicationVersion). This will return:


            Pro or ProAdvanced, the you are on a desktop

            Go_iPad for an iPad

            Go for an iPhone or iPod

            See the help for more information on this function. Depending on the value returned by Get(ApplicationVersion), set $$PLATFORM accordingly. Once the script is written, go to File > File Options... Activate the Script Triggers tab, and assign OnOpen script to Event OnFirstWindowOpen. You're all set .

            • 3. Re: Starter Solution

              Sometimes in the starter solutions there is an assumption about the way a user will navigate around. In one solution I remember a similar issue that relied on a global variable being set, but if the user navigated without using nav buttons then it didn't get set and then subsequent scripts didn't function as expected. I suggest you go back to the starter solution you began with and see if you can work out how the global variable gets set there. Maybe you will also need to copy over the script which sets the $$PLATFORM variable. You could just import this and set it to run OnFirstWindowOpen. Or you might be able to implement a better way in your own solution. The variable is really just detecting the type of device you are on, then the script you are already working with is navigating to an appropriate layout for the platform.