June 28, 200520 yr Hi, I'm relatively new to filemaker, so please bear with me if this is a stupid question. I've searched extensively online for Filemaker tutorials and have come up with next to nothing. Anyhow, I have a database of part numbers. they are either 30-xxxx or 90-xxxx. In my layout I have the fields displayed with a box behind them. Is it possible to make it so that if a 30-xxxx part is entered, the box turns green, and if a 90-xxxx part is entered the box turns blue? Any help would be greatly appriciated
June 28, 200520 yr Sure. Make a couple of global container fields and put blue in one and green in the other. (If this is a networked db, you'll need to take it offline and do this single user, so that the contents of the global containers will default to the stuff you put in them when the file is opened by other users.) Then make a calculation field. Its result will be a container (either your blue container or your green one.) The calc. should look something like If first character of serial number = "3" then return gGreen else if first character = "9" then return gBlue. (Sorry, I can't remember proper calc syntax because I just click the buttons. Note to FMI: Make me a proper text based dev environment, please. And while you're at it, make procedural calc fields that have the same syntax as the new text based scripting language you're making for me.) Then make your serial number field have a trans background. And stack it over the calc'd container field. Hope that makes sense.
June 28, 200520 yr In FM7 you can use the text formatting tools. Try Case(Left(Number Field;2) = 90; TextColor (Number Field;RGB (0;0;255)); TextColor (Number Field;RGB (0;255;0)))
Create an account or sign in to comment