3 Replies Latest reply on Dec 4, 2012 8:18 AM by jbante

    Conditional tab label

    Brad

      Can you create a conditional tab label that changes with the content of the tab contents

        • 1. Re: Conditional tab label
          LyndsayHowarth

          This is not quite what you want... but it sorta works...

           

          Note in the Position section of the Inspector the names of the field objects. The conditional formatting wouldn't work on the tabs but would when a field object was used to trigger the change by making it active. The only way to make a tab an active object is using a script... I think.

           

          - Lyndsay

          • 2. Re: Conditional tab label
            user1997

            This may not be what you're thinking of either, as I'm not entirely sure what you're asking …

             

            When I want conditional formatting or a changeable tab label, I use a field as the tab label, instead of the tab labels themselves, which aren't as flexible. The field can be set to a changeable value with a script, if you wish. Also, when I do this I usually put a calculation on the field that checks to see if the tab that it's associated with is the frontmost object, and then color and/or bold the field contents to show the "active" tab. (I use a field with multiple repetitions and tabs with numeric object names, i.e. 1, 2, 3, etc. to make the calculation simple and universal). The downside to this is, of course, you're using a field and you have to fire a script with a refresh window at the end.

             

            Hope that's helpful somehow.

             

            - John

            • 3. Re: Conditional tab label
              jbante

              If you're working with FileMaker 11 or later, you can get around the need for adding fields to the schema to achieve this effect by using <<$$mergeVariables>>. Use local $mergeVariables for multi-window solutions. You can then get around the need for a script by using Let () in the conditional formatting calculation of some other object on the layout to set the variables; but a script can sometimes be more predictable, and definitely easier to debug. If you go with local $mergeVariables, you're stuck with the conditional formatting technique unless the layout is only used while the script remains active.