Jump to content
Sign in to follow this  
Baylah

Change Color of Field Background based on Result of a calculation

Recommended Posts

Good Morning,

I have 2 questions, the first is more esoteric.

1. I am almost certain question 2 has been asked and answered on this forum, but I can't find it by searching. If someone reads question 2 will you please give me a suggestion for what is the proper way to search the archive(s)for these types of questions?

2. Main Question: Is it possible to change the background fill color of a field based on the result of a calclulation? basically:

If Point total =

0 to 25 background color = white

26 to 50 background color = red

51 to 100 background color = Blue

etc.

Any help would be greatly appreciated.

Thanks,

Steve

Edited by Guest

Share this post


Link to post
Share on other sites

Create a global container field with three repetitions that stores 3 colored images.

Then take a look at these threads.

color change calc

Link 2

Share this post


Link to post
Share on other sites

Mr. Vodka...

Once again I owe you a Vodka Martini or your beverage of choice!

This worked perfectly and is exactly what I needed. You are making me look like a genius at work. :yay:

thanks again,

Steve

Share this post


Link to post
Share on other sites

Is there a way to just highlight every other row no matter what?

Check the "Alternate background fill" option and set a color/patten in the the Body part's definition.

Share this post


Link to post
Share on other sites

Is the "Alternate background fill" an option that is for FMP 6 or is it a different version? I've searched everywhere that I can think.

Share this post


Link to post
Share on other sites

Sorry, I thought we were talking about 8.5.

This feature was new in FM7, I think.

Share this post


Link to post
Share on other sites

I think that you could create similarly, a global field to store the background image. Then a calc to display the image stretched to the size of each row.

Case (not Mod(Status (CurrentRecordNumber), 2), gImage )

Share this post


Link to post
Share on other sites

If you are talking about a Portal on in Form View, you can set the Portal to do this. If you want this in a List View, there are a few sample files out there that show how to do this, do a search for Alternate at www.databasepros.com. However, if you are wanting to do this in Table View, it can not be done.

HTH

Lee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

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