4 Replies Latest reply on Oct 22, 2012 8:59 AM by philmodjunk

    "Field Behavior" control by Scripting



      "Field Behavior" control by Scripting



           In FMP10

           Can i set up script that controls the "Allow Field to te entered: In Browse Mode .... and       In Find Mode

           IF  so and so .... ;In Browse Mode = true; In Browse Mode = False


           Anyone ?

           Regards Nils

        • 1. Re: "Field Behavior" control by Scripting

               Hi Nils,

               You can turn off entry to the field in browse and find then attach script similar to:

               If [ this and this ]

               Halt Script


               Go To Field [ yourField ]

               End If

               ... sorry for the extra spaces.  I cannot use shift to stop the extra space when on iPad.

          • 2. Re: "Field Behavior" control by Scripting

                 Thanks for the reply :-)

                 I think I need to explain some more, as your example don't give me the result I am after ...

                 I have a layout with 4 pictures (container fields with content), and one global Container field, thats empty by default.

                 The idea is that when you click on one of the 4 pictures, the selected picture is copied into the Global container field, that gives a larger view of the selected picture.

                 If you then click on the LARGE PICTURE i have set it up so that it gives me an even larger view (Full screen), with the ability to export  the pic, and close the window

                 All of this is working fine.

                 The problem I have is that if I click on the large picture when the Container is empty, I get the ADD AUDIO dialog box, and that is not very desiarable :-)

                 I need a way to lock the LARGE PIC field from entry when the LARGE PIC container is empty, and only allow control of the LARGE PIC field when the LARGE PIC container has content

                 Is this doable ? Still on FMP10 :-)



            • 3. Re: "Field Behavior" control by Scripting

                   You can set a script trigger to run on field entry and to, for example, show a Custom Dialogue 'There is no photo to show'.  The script just checks for IsEmpty (The Container field ).

              • 4. Re: "Field Behavior" control by Scripting

                     You can also format the field as a button that performs a script when clicked. The script can check to see if the field is empty and only do a go to field to put the focus in the field if it is not empty.