freecolours Posted October 28, 2002 Posted October 28, 2002 I've found some solutions in FMForums for this, but none of them solved my request .... In a listview I want to change the record background to a red color, but only when "STOP" in a text field is selected. I'm sure it must be something with a global field and a calculation.
BobWeaver Posted October 28, 2002 Posted October 28, 2002 The popular technique is to create a global container field "gColours" to hold several coloured rectangles. Then you create a calculated container field "cBkgndColour" with a formula like this: Case(logicaltest1, GetRepetition(gColours,1), logicaltest2, GetRepetition(gColours,2), logicaltest3, GetRepetition(gColours,3), logicaltest4, GetRepetition(gColours,4))
CobaltSky Posted October 28, 2002 Posted October 28, 2002 You'll find the basic technique shown in bold technicolor in the attached demo file. It's a blindingly bright file, so don't gaze at it for too long lest your eyesight wain or waver. Apologies to the more aesthetically refined members of this forum - but I guess a color demo should be - well ... colourful!!! BackgroundSelect.zip
LaRetta Posted October 28, 2002 Posted October 28, 2002 This is very helpful in understanding global containers (particularly using validation calcs) and also utilizing the Get Repetition on Repeating fields. So, since it's a repeating field, you only need to attach the script to Rep1? Also, then, to paste colors in all 5 Repetitions, I just need to make sure it's set to 'show 5 reps' and 'allow entry into field when pasting from browse?' I love this stuff! HEY, how did you get SCRIPTS on the FM bar to say NIGHTWING?!?
CobaltSky Posted October 29, 2002 Posted October 29, 2002 There are five scripts in the demo, one for each repetition of the container field. And yes, the colors have to be pasted separately into each of the repetitions in browse mode. Changing the name of the 'Scripts' menu is achievable with the Developer tool which comes with FileMaker Developer.
freecolours Posted October 29, 2002 Author Posted October 29, 2002 Thanks a lot everybody! It works great and I have some new ideas about using colorfields in layouts, like a 'red' sign to stop or a 'green' sign to release a record. Karel * * * A thankful heart is a happy heart * * *
Recommended Posts
This topic is 8132 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 accountSign in
Already have an account? Sign in here.
Sign In Now