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.

Featured Replies

I've found some solutions in FMForums for this, but none of them solved my request frown.gif ....

In a listview I want to change the record background to a red color, but only when "STOP" in a text field is selected.

I'm sure it must be something with a global field and a calculation. crazy.gif

The popular technique is to create a global container field "gColours" to hold several coloured rectangles. Then you create a calculated container field "cBkgndColour" with a formula like this:

Case(logicaltest1, GetRepetition(gColours,1),

logicaltest2, GetRepetition(gColours,2),

logicaltest3, GetRepetition(gColours,3),

logicaltest4, GetRepetition(gColours,4))

You'll find the basic technique shown in bold technicolor in the attached demo file.

It's a blindingly bright file, so don't gaze at it for too long lest your eyesight wain or waver. smile.gif

Apologies to the more aesthetically refined members of this forum - but I guess a color demo should be - well ... colourful!!! wink.gif

BackgroundSelect.zip

This is very helpful in understanding global containers (particularly using validation calcs) and also utilizing the Get Repetition on Repeating fields. So, since it's a repeating field, you only need to attach the script to Rep1? Also, then, to paste colors in all 5 Repetitions, I just need to make sure it's set to 'show 5 reps' and 'allow entry into field when pasting from browse?' I love this stuff!

HEY, how did you get SCRIPTS on the FM bar to say NIGHTWING?!?

laugh.gif

There are five scripts in the demo, one for each repetition of the container field. And yes, the colors have to be pasted separately into each of the repetitions in browse mode.

Changing the name of the 'Scripts' menu is achievable with the Developer tool which comes with FileMaker Developer. wink.gif

  • Author

Thanks a lot everybody! It works great and I have some new ideas about using colorfields in layouts, like a 'red' sign to stop or a 'green' sign to release a record.

Karel

* * * A thankful heart is a happy heart * * *

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.