3 Replies Latest reply on Feb 11, 2009 12:34 PM by ninja

    Can you run a Script on data entry?



      Can you run a Script on data entry?


      Hi everyone.


      I am working on a program that involves, ultimately, the printing out of a form for a governmental program.  There are about 12 layouts, each involving items a person applying for this program must fill out.  After completion, the program prints out the form with the data on it and runs a number of calculations that are printed on an addendum sheet that provides the information in an easier and more concise manner than the application does.


      My issue is this ... garbage in garbage out.


      Before an application can print I want the user to commit, using a Y/N radio button that the information on the particular layouot is complete.  I want to be able to run a script that when the user enters Yes on the adio button, the script runs and verifies that each required answer is filled out.  I cannot make the answers mandatory by doing so on Auto Entry because the information is often filled out piece meal as the input person receives it.


      I then have each tab at the top of the screens change color when the information is complete using conditional format.


      That is a long dialogue on my app.  Sorry.  The bottom line is, Can I run a script when a person enters information into a field?


      Thank you

        • 1. Re: Can you run a Script on data entry?

          Howdy Carlz,


          To make it LOOK like running a script on data entry = yes.

          To actually do it...what version are you on?  FMP10 has script triggers that can do what you seek.


          To fake it if you're on FMP9 or earlier, you can put an invisible button over the check box (lay the button over the box, choose no fill and no border)  And have the button launch your script that does the following


          SetField [CheckboxField;"Yes"]

          Perform Script[check the fields]


          Does that do what you're after?

          • 2. Re: Can you run a Script on data entry?
               Tha sounds like it might work.  Would it be the same for Radion buttons?  I have version 9, I purchased it on December 24.  Ii am awaiting the upgrade to version 10.
            • 3. Re: Can you run a Script on data entry?

              I suppose that could work for radio buttons too, but you'd need one invisibutton to cover each radio selection.  That way the setfield would set the right button.  I haven't tried it for a radiobutton before, but I don't see why it wouldn't work.


              If you're planning to upgrade soon anyway, you might find it worth waiting and using the triggers instead.  Your call.