Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Changing row color conditionally in LIST VIEW

Featured Replies

Hello folks, old trick new twist.

I want to color the whole row based on values in C_fieldA, for instance.

I seem to remember, that I need to create global repeating container, paste colors into it, and create C_fieldA calculated container to grab the colors.

Here's what I did:

G_colors is global container with 7 repetitions

value list with 7 different options

Notes is text field formatted for the above value list

C_Notes is calculated container, something like:

Case(Notes=*option 1*, GetRepetition( G_colors , 1),

Notes=*option 2*, GetRepetition( G_colors , 2), etc)

Then I position C_Notes behind the whole row in form view, make the row transparent, and send C_Notes to back. This works just fine in Form View, but in List View only the first record gets colored.

Question: how can I make it work in List View ?

Rows in Form View?:?

ListView - same as in form view. Just make sure Notes is not empty, or rather define a color for isempty(Notes).

Don't you mean table view? No way there.

  • Author

Hmmm, for some reason in the List View it doesn't work for me.

When I'm in Form View and scroll using a rolledex the whole row gets colored properly.

But in List view only the firs record gets colored regardless in which record I set the value.

I know you can't do it in Table view. I'm including the file for easy reference:)

TestColorRecord.zip

This may be because your color calc field is too big for the row. Reduce the size so that it does not exceed the row border and see if it works.

Ken

Have a look under "Finding Names" for my sample file in the Samples section of the forum. Its on about page 6 by now. This technique is demo'd there.

There is also coverage of conditional background colour fills in my Handy Bits file.

  • Author

Ken, you are absolutely right, making the calc field smaller did make a difference.

Now I have another issue, though. This file is on FileMaker Server, so the Global Container does not persist. I totally forgot about the that fact, so when I close the file and reopen it, the pasted colors are GONE.

Is there a way to implement this on the FileMaker Server?

BTW, Russ, your Name Finder is very nice, thank you!

Hi BikeBoy,

Close the file on the server, open on a client, then paste the colors. This will certainly work, but before be REALLY carefull that the file is REALLY closed on the server!

Regards,

Ernst.

  • Author

Thank you ernst, it worked beautifully!!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.