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.

Highlighting rows upon condition

Featured Replies

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

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

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.

David: Could you please post an example of how this works? I have tried doing it several different ways, and I have yet to be successful making it function as you say it should.

Thanks!

-Kevin

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

  • Author

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

Try holding down Ctrl-Alt while changing the text type.

  • Author

Ah! Mr Vodka. Just what the doctor ordered.

Thankyou. That worked.

(but why? I need to know WHY it worked so i don't make similar mistakes again)

Because you need to override the default storage option language.

font_override.jpg

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

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

I placed a 1-pixel bitmap into a global container field...

Don't place a so tiny image into the field, put a rectangle instead !

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.