1 Reply Latest reply on Apr 28, 2011 4:37 AM by Lpurp

    Resetting a Variable?



      Resetting a Variable?


      Hello and greetings to all you fellow FileMaker users!

      This is my first post here and I'm fairly new to FileMaker so bear with me.

      I have created a layout that contains a tab area with 3 tabs. In each of those tabs are portals which contain fields for various data. In the 2nd tab, I've applied a script to a field that sets a variable when it is selected/clicked, and resets it when it is deselected/clicked again. This ties up with some conditional formatting that colours the field blue when selected. This works well, however, I want to reset the variable of the selected field if I navigate away from that tab, because by navigating away, either by selecting another tab, or moving to the next record, I am choosing to 'deselect' that field.

      How do I do this?

      Thanks in advance for your simplified instructions ;)


        • 1. Re: Resetting a Variable?

          Well, as is usually the case when you get to the stage of requesting help on a forum, I've managed to fix it!

          I put a script trigger on the portal. I knew about script triggers and I'd tried a few but I didn't think of putting it on the portal! So, exiting that portal runs the script which resets the variable.

          I also put another script trigger on the layout itself to fix another similar issue.