Skip 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.

Conditional field color

Featured Replies

Hi,

I'm trying to make the color of a field conditional on the value entered in the field.

If the value in field "test" is Y then i want the color of the field "test" to be green; if the value is N then I want it to be blue.

I have read a number of posts but can't make anything work. I created a global container field gGreen and another one gBlue and formatted one to be green and the other one to be blue. Then I stacked on on top of the other and placed the "test" field on top of both of the container fields. I attempted various ways to put a calculation into the test field but had no success.

Help is much appreciated,

yknot

yknot,

Try this.

Create one repeating global container field. Lets call is gBackround. For the first global value, enter a blue image, for the second, a green image.

Next create a calculation field that is something like, Case [Test="Yes"; gBackround; gBackround[2] ]

Then put your field with transparent background ontop of the gBackground field. Lay it ontop of it.

  • Author

Thanks for the reply - when you say "image" please explain. I tried a repeating field before but when I format the field color I can not format different repetitions with different colors.

Hi yknot,

Along with mr_vodka description, take a look at this file I posted to a similar question the other day. I used a mockup dog and Cat graphic, but it pretty much does what he just described.

Click Here

HTH

Lee

I also modified it to follow what you were describing initially.

Lee

yknotTest_.fp5.zip

Edited by Guest
added file

  • Author

Thanks Lee,

I got myself tied up in trying to format the container field with different colors.

Are you aware of someplace from where one can import images of color??

yknot

color is easy, go into layout mode, draw box (usually no lines is best), there is one in the sample I just posted, Fill the Box with the color of choice, Copy the box while in Layout Mode, Then switch to Browse mode, and paste it into the container field of choice.

Lee

  • Author

Sooooo simple! But the devil is in the detail

Thank you

You could also just change the color of the text. See attached Example.

Use the Auto Enter Calculation, note that the "Do Not Replace existing values..." box is not checked.

You can change the colors used in the sample by changing the RGB mix.

HTH

Lee

ChangeTextColor.fp7.zip

  • Author

Hi,

I got both the field color and the text color to work thanks to your help. However; when I switch to the "View as Table" mode, the field color method does not work anymore. Field1 separates from c_GraphicField. Any ideas?

yknot

You can not see graphics like that in Table View (one on top of the other), FileMaker wants to line up your fields in a row, like you would see in Excel.

I would just create a new layout using List View (aka Column View) , and incorporate all of this stuff in it.

Lee

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.