Jump to content
Server Maintenance This Week. ×

Highlighting rows upon condition


Greg Hains

This topic is 6183 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi.

I am looking to change the background color of a row depending on data in the row. I was thinking of using a technique like changing the text color based on a condition as a field, by having a background block behind the fields on each row and having it change color depending on the condition.

My problem is how to identify it as an item in FmPro then change it's attributes as data conditions change. Is it a field? An object? A container?

Anybody got any ideas please?

Greg

Link to comment
Share on other sites

I use the webding fonts "g" char, in a mergefield underneath the other fields or next to them... take a look at the attached template - which deliberately contains socratic noise, so you can't poor it into your solution without getting the gist of it!

--sd

pling.zip

Link to comment
Share on other sites

I have a Globals table with globally stored containers to hold 1x1 pixel colors.

In the field that feeds the portal, I use a calculation field with a container result with the basic form of:

Highlight =

Case(

x=2; Globals::HighlightYellow;

x=3; Globals::HighlightRed

)

I place Highlight field behind the fields in the portal row.

Link to comment
Share on other sites

I'm sure that David could post an example, but it will be redundant to several examples that have been posted in the past.

Do a search for Background and color, and you should find several.

When search for keywords, you can narrow down the results by using a plus sign on those words that must appear in the hit. For your search, it would look like [color:blue]+background +color.

HTH

Lee

Link to comment
Share on other sites

Hi Soren.

Thaks for your response.

I sort of have this working but have encountered a problem with it (sorry to be a pain in the neck).

I place the field, and set the calculation, but the font comes out as Wingdings no matter what I set. What should I do to make sure this Webding font stays as Webdings. Do I need to further configure FmPro to use it?

Cheers,

Greg

Link to comment
Share on other sites

Thank you, Lee.

I found an example that I'm hoping will work:

Dynamic Color Background

Now, let me be more specific about the problems I had:

I placed a 1-pixel bitmap into a global container field, and Filemaker reported "Unknown Container Object". When I made the graphic 50x50, the graphic at least showed up.

When I placed the global onto the page, I was able to make it appear when I wanted it to appear, but I could not figure out how to make it stretch to fill the space in which I placed the field on the layout. I tried setting the Graphic Format dialog to "Enlarge image to fit frame" and unchecked "Maintain original proportions", but the image only ever filled a small portion of the calculation field as I had positioned it on the layout.

I'm sure I'm overlooking one simple thing - and I'm sure that this has already been asked and answered somewhere in the forums. But I haven't yet found the answer, as I'm probably just not searching for the right combination of keywords.

Thanks.

-Kevin

Link to comment
Share on other sites

A bitmap image, hummm, I don't think I have tried a one pixel bitmap images before. What program did you create this in?

Are you trying to create a gradient?

Can you attach a copy of the bitmap?

Lee

Link to comment
Share on other sites

What I do to create colors is to choose a color in layout mode and make a 50x50 box of it. Then I copy and paste that next to itself and using View Object Info, change it to a 1x1. I copy that, switch to Browse and paste it into a gobal (or a regular container field that loads a global on startup).

Link to comment
Share on other sites

This topic is 6183 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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