6 Replies Latest reply on Aug 8, 2014 7:43 AM by Kathy

    Conditional formatting based on values from another table/layout

    Kathy

      I have a layout that is essentially a list of links; I'll call it Menu and it isn't associated with any table. Each link takes you to a particular record. Each record has a field that will contain one of two values, for example, true or false. If the value is true, I want the color of the link for that particular item to be blue in the 'menu' layout and red if the value is false.

       

      Is it possible to implement this type of formatting where I can conditionally format text on a layout from the values in a field from a another table.

       

      Table: Account

      Fields

      ID (An integer)

      Status (True or False)

       

      Layout: Menu

      Links

      1 <-- is a link that takes you to a layout and displays the record where ID = 1, if Status = true, text color = blue.

      2

      3

       

      I hope that makes sense.

        • 1. Re: Conditional formatting based on values from another table/layout
          erolst

          Kathy wrote:

           

          I have a layout that is essentially a list of links; I'll call it Menu and it isn't associated with any table.

          […]

          I hope that makes sense.

           

          Not too much … for instance, every layout isbased on a table occurrence, and consequently, associated with a table. And how do you generate these “links”? And is there one for every Accounts record, or only for specific ones?

           

          It may make more sense to use a relationship and portal (either/both being filtered) into Accounts, to display a portal row for each desired record; then you can use the related records's field value for the CF calculation.

          • 2. Re: Conditional formatting based on values from another table/layout
            Kathy

            I guess I simplified it a little too much. What I am trying to do goes beyond the purpose and design of FileMaker and I was hoping with some tweaking I could extend it in order for it to do what a client has asked me to do, if it is at all possible.

             

            The layout is a drawing with lines that are labeled(links). The lines correspond to a record that contains fields pertinent to that line. The feature requested is a visual respresentation of the status of each of these line/labels that displays the colour associated with a status. Think of it as diagram of a house. The house has a roof, walls, doors and windows. These individual pieces would have a record that contains more information about that piece. For example, the roof record may have details regarding colour and shape and importantly, whether or not the piece has been installed (true or false). On the diagram, if the roof has been installed, the shape color could be blue and red if it has not been installed. That may be more difficult to do.

             

            I was hoping to use the conditional formatting option for each object(link) to grab the status for the record that matches the object name and change the color of it.

            • 3. Re: Conditional formatting based on values from another table/layout
              erolst

              Kathy wrote:

              What I am trying to do goes beyond the purpose and design of FileMaker

              What you envision certainly isn't the core job description of FileMaker, but I don't see why it wouldn't be feasible.

               

              Quick & dirty: you can place objects above the individual sections and hand-code the CFs, e.g. using ExecuteSQL() to target fields corresponding to those sections and query their status. You cannot CF a geometric object, but you can mis-use a button as object – and buttons can be CF'd (after you've stretched, bent and sheared then into shape).

               

              A more structured approach would probably be to generate SVG code to display in a Web Viewer, taking into account those status fields to calculate the graphical attributes (line color, thickness etc.) and even render additional data.

               

              I can imagine that there are JavaScript/jQuery plug-ins for such applications which you can use in the Web Viewer, feeding them data from your fields. I'm sure someone else can chime in and make more concrete suggestions or provide links. (This forum has at least one very knowledgeable former Web Designer.)

               

              The usual tradeoffs apply: fast implementation vs. more preparation in setup, but vastly more flexibility. Hard to tell how sophisticated your method needs to be without knowing more details.

              • 5. Re: Conditional formatting based on values from another table/layout
                Kathy

                This is how the diagram would look. In a real case, this would be larger, possibly 5/6 units tall and 6/7 units wide.

                 

                ScreenCapWeld.jpg

                • 6. Re: Conditional formatting based on values from another table/layout
                  Kathy

                  erolst, Thanks for the feedback! I am going to look into these options. I am mocking up a demo for the client and gauging how much work it would take to implement this.

                   

                  keywords, This is similar to the solution I have come up with. I did not consider the fill color option but that definitely makes it a bit easier to implement. Thanks!