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.

RGB Color setting?

Featured Replies

Hi,

I would like to have my Textbox background Change color on a calculation!

Is this possible?

Thanks for youre reply!

Use the TextColor function.

I think the TextColor function only changes the color of the text. I would be surprised if it changed the field's background color.

There are some clever but kludgy ways to make the background look like it has changed color by utilizing container fields. I've only done this once before so I'm not the right person to explain it. Do a search on the Forums and I'm certain thay you will find your answer.

You're right. I misread the question.

Make the fill transparent and then put a container calculation field behind it.

The calculation will be Case( sometest; globalcontainer1; someothertest; globalcontainer2; etc.) GlobalcontainerX can either be one field with multiple repetitions (in which case you would reference it with GetRepetition( globalcontainer; X ) for all repetitions greater than 1) or separate global fields. In Layout Mode, make a box with the desired fill color, then select and copy it, enter Browse Mode, and paste into the appropriate global container field/repetition. Repeat for each color.

  • Author

Yep, I get it.

It works great!

I think it would be a good function to have in FM what do you think ?

Thanks guys.

Yes it would! Personally I'd have more use for a function that sets background color than one that sets the text color.

  • 1 month later...

I can't seem to get this to work. Can you post an example?

Thanks

  • 2 months later...
  • Newbies

I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.

  • Newbies

I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.

  • Newbies

I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.

can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like:

case(

fielda=1;goBG

)

I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?

can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like:

case(

fielda=1;goBG

)

I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?

can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like:

case(

fielda=1;goBG

)

I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?

Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it.

Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.

Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it.

Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.

Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it.

Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.

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.