2 Replies Latest reply on Nov 4, 2014 8:43 AM by TimCranwill

    Conditional formatting based only on first row of portal.

    TimCranwill

      Title

      Conditional formatting based only on first row of portal.

      Post

      I have a portal with a field that has a drop-down list of (red, green and blue.) if a new portal record is created i want the background of said field to change based on the color of the value list. Very easy to do BUT i want a copy of the portal field on the layout (outside of the portal) and i want it to change color based on the newest portal record created... But it doesn't change color. It only takes the color of the first created record and as i create more rows and change the value in the field it doesn't change?

      HELPsmiley

        • 1. Re: Conditional formatting based only on first row of portal.
          philmodjunk

          Set up a script trigger on the field in the portal row such as onObjectSave that performs a script that sets a $$GlobalVariable to the value of your field. Take the field outside your portal and set up it's conditional format expression to refer to the $$GlobalVariable. You may need to give this field an object name in the inspector and include a refresh object step in this same script in order to get the field to smoothly change color with each new value selection in your portal (If you are using filemaker 13. If not, use a refresh window script step.)

          • 2. Re: Conditional formatting based only on first row of portal.
            TimCranwill

            Yep! I use a set field (the one with conditional formatting)  to $$global onObjectModify (of field inside portal), honestly should have been able to put that together myself but was having an off day. Thanks for pointing me in the right direction.yes