1 2 Previous Next 22 Replies Latest reply on May 29, 2017 6:04 PM by Stephen Huston

    Conditional formatting a shape

    btb01

      Hi --I am trying to use conditional formatting to change color of shape based on a value ...I have sent the shape - a rectangle to the back --and placed fields on top (all good so far.)  I can use conditional formatting to change fields no prob --but it is greyed out for the shape object...any ideas?

        • 1. Re: Conditional formatting a shape
          philmodjunk

          Use a field for your rectangle. Then you can use conditional formatting to control the fill color.

          • 2. Re: Conditional formatting a shape
            philmodjunk

            But if you have fields on top of the rectangle, you might just conditionally format them instead.

            • 3. Re: Conditional formatting a shape
              siplus

              by using padding and corner radius you can do wonders, but you must evaluate whether the result is worth it.

               

              Let's talk a simple object, very useful in user interface: a triangle. Left pointing, up pointing, you name it.

               

              Filemaker, as of version 16, still has no control over such a shape. Provided it's small enough, you can build it up with 1 pixel lines. It's like programming the sprites in Apple ][...

               

              All you get from Filemaker is 2 shapes: a oval and a rectangle. Oh, you also get a rounded rectangle - a stupid redundancy - as a rectangle can be transformed into a rounded one by altering corner radiuses in inspector, but I guess we're in marketing territory now.

               

              You're better off investing in declaring constants like char(9660) and rotating it as necessary, with all the textColor available to you, dependent on normal - hover - pressed.

               

              I often use the full block - char (9608) - as well, in script comments and also on layouts.  You can produce these chars in DataViewer while using Advanced and copy paste them, although on a Mac I do recommend investing in PopChar.

               

              Of course the original ache still hurts - I can't alter the line weight and color of a char as I can do with a shape - but apparently somebody is crossing fingers on reaching v16 without dedicating code to it and it will stay that way forever.  Like numeric value holding palettes not allowing math inside their fields. Something that QuarkXpress was offering more than 20 years ago. Oh well.

              • 4. Re: Conditional formatting a shape
                btb01

                HI Phil --thanks much for  help!  I am not following "Use a field for your rectangle."   I used the formatting tool - dragged a rectangle down and sent it to the back (my fields on top) ---so not sure how to associate a field with that rectangle ... hope that makes sense

                 

                • 5. Re: Conditional formatting a shape
                  philmodjunk

                  The field IS a rectangle. If you give it visible borders, it is now a rectangular shape is it not?

                   

                  As siplus mentioned, you can even round it's corners.

                   

                  You can now conditionally format this empty field's fill color.

                   

                  Another approach is to put several different rectnagles in a stack on top of each other--each with a different color and use hide object when to control which one is visible at any given time. But an empty, conditionally formatted field seems a simpler approach to use--with the draw back of needing to add another field to your file.

                  • 6. Re: Conditional formatting a shape
                    btb01

                    Sorry - not following...I used the formatting tool --dragged a rectangle down --and sent it to the back (my data fields on top) ---I cant seem to conditionally format that ....I tried to create a new object -- made it a container - and tried to follow your info but did not see the you discussed.  My goal here is pretty simple --a rectangle with 4 data fields that changes from red/yellow/green based on conditions

                    • 7. Re: Conditional formatting a shape
                      philmodjunk

                      Define an empty field in your layout or portal's table. It can be ANY DATA Type.

                       

                      Use the field tool or field picker to add it to your layout.

                       

                      Use the inspector to give it visible borders.

                       

                      Your empty field is now a rectangle.

                       

                      Use conditional formatting to specify any different fill colors that you want this field to take on.

                       

                      Come to think of it, a "do nothing" button could be used in the same manner.

                      • 8. Re: Conditional formatting a shape
                        btb01

                        I wonder if i created the rectangle the wrong way --does not appear to make a new field (not showing up in my list of fields) --and I dont seem to see options for border either --sorry to be such a newbee on this topic

                        • 9. Re: Conditional formatting a shape
                          erolst

                          siplus wrote:

                          Oh, you also get a rounded rectangle - a stupid redundancy - as a rectangle can be transformed into a rounded one by altering corner radiuses in inspector, but I guess we're in marketing territory now.

                          Wasn't the rounded rectangle on offer we could set a corner radius? I think they kept it for backward compatibiliy.

                          • 10. Re: Conditional formatting a shape
                            btb01

                            kk - trying it now

                            • 11. Re: Conditional formatting a shape
                              erolst

                              My suggestion would be a one-panel slider w/o navigation dots. That has also the advantage that a panel is a container, so it is aware of its contents which is handy for moving stuff in one fell swoop.

                              • 12. Re: Conditional formatting a shape
                                philmodjunk

                                I wonder if i created the rectangle the wrong way

                                Yes you have created it the wrong way if you want to follow my suggestion. You'd open manage database and add a new field to either the table on which the layout is based or to the table on which a portal is based if you located this inside a portal row.

                                • 13. Re: Conditional formatting a shape
                                  siplus

                                  I see your pain.

                                   

                                  NO, you can't conditional format a bloody rectangle. Nor can you do that with a line.

                                   

                                  What you are conditional formatting has to somehow offer a value. even if that value is a plain text consisting of a space.

                                   

                                  So if you go into layout mode, type a space, make it larger and taller, give it a line and a fill, well, you can Cond format that.

                                  • 14. Re: Conditional formatting a shape
                                    TomHays

                                    The shape objects do not support conditional formatting.

                                    But the Text objects do.

                                     

                                    In Layout mode, draw a rectangle with the Text tool.  Type a space in it.

                                    Position and resize the rectangle to the size you want.

                                    Edit the Conditional formatting of this Text block rectangle.  You can change its fill color with conditional formatting.

                                     

                                    -Tom

                                    1 2 Previous Next