Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Can you create a script to change the format of a field...ie background color/pattern?

I want to be able to check a box and if its checked certain fields will become a different color.

thanks!

Posted

Unfortunately there is no "built-in" way to do this in FMP. The common way to handle this is to import a one-pixel image of the color you desire into a global field. Then, create a calculated container field that, if your criteria are met, is equal to that global field. Place that calculated field behind the main field in question and make the main field in question transparent.

Posted

A slightly more powerful version of the above suggestion involves a repeating container field (either global or normal placed in a Preferences DB) which contains swatches of various colors and/or other graphics. It then uses calculated "Background" fields to display a particular swatch based on the value in some other field.

For example:

cBackground = If ( Value1 = "Yes", GetRepetition ( gColorSwatches, 1 ), "" )

This will cause the background field to use the swatch in repetition one.

You could then have either a case statement in the cBackground field or use seperate background field for different criteria.

Posted

I tried the second method posted by Goldraven.. It does not seem to work! when the criteria is met I get a one pixel image in the calculated container field as opposed to the color filling the enitre container field..

What am i doing wrong..

Stu

This topic is 8262 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.