8 Replies Latest reply on Jul 11, 2014 11:22 AM by chocophile

    Conditional Format Entire Portal Row Text Color

    chocophile

      Title

      Conditional Format Entire Portal Row Text Color

      Post

           I have a portal of customer interactions, and I'd like to conditionally format the entire row based on the value of one field.  For example, if the interaction is complete I'd like all fields in that row to have a text color of gray.

           I'm aware of the Self function, and I used that to change the background color of the whole row.  I moved the "Complete" field to the far left column of the portal, left justified, and extended its length all the way across the row, then sent it to back.  I conditionally formatted the background color to gray.

           That works ok, but I really want all the text to be gray, not the background color.

           I think I'm looking for a way to indirectly refer to another field using Self as the starting point, so that each field would have conditional formatting that refers to the Complete field.

           Thanks for any thoughts.

        • 1. Re: Conditional Format Entire Portal Row Text Color
          philmodjunk
               

                    That works ok, but I really want all the text to be gray, not the background color.

               The same conditional format setting can be used to specify a text color instead of a fill color. The controls are right next to each other as you can select colors for either fill, text or both so I am a bit confused by why this should be a problem.

               

                    I think I'm looking for a way to indirectly refer to another field using Self as the starting point,

               Can you explain what you mean by that--particularly the "indirectly refer" part? "Self", in a conditional format expression, is a way to refer to value of the currently selected field so it is specific to that one selected field without naming it explicitly. If you want to use the same expression checking the value of the same field for multiple objects, you will need to explicitly refer to that field instead of using "self".

               BTW, instead of extending the width of the field, you can also select a group of layout objects, such as all the fields in a portal row, then right click them and specify a single conditional format and FileMaker will apply that conditional formatting to all of the selected objects. But don't use "self" in that case as that term will evaluate as a reference to a different field for each of the selected objects--unless that is the behavior that you actually want to have take place here.

          • 2. Re: Conditional Format Entire Portal Row Text Color
            chocophile

                 I'd like each field in the portal row to have gray text when the "Complete" field for that row has a value of "Yes".

                 For example, another field in the row is "Description" and I want the conditional format of that field to be determined by value of Complete for that row.

                 For now, instead of having gray text (since I couldn't figure out how to do that) I settled for a gray background in the one field that I have stretched across the entire portal row in the background.  That seems like a hack to me, but it at least visually identifies the row as an interaction that's completed.

                 Thanks.

            • 3. Re: Conditional Format Entire Portal Row Text Color
              philmodjunk

                   Enter layout mode

                   Shift click each portal row field so that all for which you want this format are selected.

                   Right click one of the selected fields and choose "conditional formatting..."

                   Set up the desired conditional formatting expression, but refer to the complete field explicitly by name in the specify calculation dialog instead of by using "self".

                   Select your grey text color. and Click OK to close the dialog.

                   You have just set up identical copies of the same conditional format on all the fields in your portal row.

              • 4. Re: Conditional Format Entire Portal Row Text Color
                chocophile

                     I tried that and it didn't work for me.

                     One additional piece of info is that the layout's table is Interaction.  I'm using a portal to show a records for a particular client.

                     So the conditional formatting I set up on all the fields Interaction::Complete="Yes" is referring to the current record.  As I step through the records, the conditional formatting changes the look, based on the Current Record.

                     Am I missing something?

                     Thanks.

                • 5. Re: Conditional Format Entire Portal Row Text Color
                  philmodjunk

                       "That didn't work for me" doesn't give me any new info to work with to see why or how it didn't work.

                       As I step through the records, the conditional formatting changes the look, based on the Current Record.

                       Is this what is happening now that you don't want or is this what you want to have happen?

                       Are you "stepping through records" in the layout's found set or the rows of your portal?

                       

                            the layout's table is Interaction.

                       

                            Interaction::Complete="Yes"

                       If Complete is either field of type "text" or a calculation field with "Text" as its result type, this expression should cause all fields of all portal rows for the current layout record to show grey text when "yes" is the exact text in that field (This is not case sensitive, but if you use a value list to select this value, some value list setups don't actually enter the text visible on the layout into the field, but enter a different value.).

                  • 6. Re: Conditional Format Entire Portal Row Text Color
                    chocophile

                         Sorry I wasn't specific enough.  The screenshots below might help.  They are of the same portal, taken at two different times.  The layout table is Interaction, and the portal is showing records from a self-join table called Interactions_For_Client.

                         When the current record is record 24, my portal looks like the first screenshot.  There are four records in the portal; two are Done (which I labelled as Completed in my previous posts).  The conditional formatting for all fields is the same.  Only the "Done" field text is in gray on the two rows, not on the other fields in those rows.  I would like all fields in those two rows to have gray text.

                         When the current record is record 26, my portal looks like the second screenshot.  All text is gray, except for the Done fields of the portal records which are not done.

                         The only thing that changed between these two screenshots was my clicking the right arrow on the record selection to get to record 26.

                         Thanks.

                    • 7. Re: Conditional Format Entire Portal Row Text Color
                      philmodjunk

                           Then if "interactions_for_client" is the name of the table occurrence selected in "Show related records from" in portal setup for this portal, then your conditional format expression needs to refer to that table occurrence, not "interactions":

                           interactions_for_client::Complete="Yes"

                           Otherwise, your expression refers to Complete from the layout's current record instead of Complete from the portal's record.

                      • 8. Re: Conditional Format Entire Portal Row Text Color
                        chocophile

                             Thank you!

                             That solved my problem... I had the wrong table in the Conditional Format.

                             thanks.