I have tried this script but it doesnt seem to work - I have created a new calculation field called Hidden Authors Corrections and inserted this script:
(Artwork Actual Hrs for Authors Corrections ≥ Quoted Hrs for Authors Corrections,
TextColor(Artwork Actual Hrs for Authors Corrections;RGB(255;0;0)),
TextColor(Artwork Actual Hrs for Authors Corrections;RGB(0;0;0)))
It sounds to me like you would be better off using Conditional formatting for this, rather than using a calculated field.
Select the field on the layout where the colour change is required, then right click the field and choose Conditional Formatting.
Click on Add, it should show the drop down as Value Is
Next choose greater than or equal to
Then enter : Quoted Hrs for Authors Correction
Finally set the text colour, style, background colour etc as you desire.
If this field is shown on other layouts, just copy and paste the new formatted field, or repeat the above.
The OP is on FM6. None of these options were available.
To the OP:
You will have to create a calculation field that returns the value of the text field. You can change the color of the calc.
Thanks but I am only a simple user of filemaker and I don't really know what that means
Does it have to be Bold text? There's a function that will turn it all capitals. Not as nice as making it bold, but easier to implement.
Make a new calculation field, actual authors corrections rpt, as:
If ( actual authors corrections >= quoted authors corrections , Upper ( actual authors corrections ) ; actual authors corrections )
If not, then use Mr Vodka's suggestion.
Make two calculation fields:
If ( actual authors corrections >= quoted authors corrections , actual authors corrections ; "" )
If ( actual authors corrections < quoted authors corrections , actual authors corrections ; "" )
Place the fields on top of each other on your layout (make sure they are transparent not filled with a color ) and apply a distinctive format such as bold to the first field.
I was trying something like this to make the colour change but it doesn't work
If ("Artwork Actual Hrs for Authors Corrections" ≥ "Quoted Hrs for Authors Corrections", TextColour("Artwork Actual Hrs for Authors Corrections"; RGB (255;0;0)) ; "Artwork Actual Hrs for Authors Corrections")
It's telling me I have a problem with "Either an operator was omitted, this function cannot be found, or "(" was not expected here." and then Highlights on the TextColour word
I used your suggestion of creating a separate calculation field "Artwork Actual Hrs for Authors Corrections rpt"
As I said earlier, those functions did not exist in FileMAker 6.
In FileMaker 6 you have to create a calculation field that return the same data but then color the text as you like.
So for example your calculation would be something like:
Case ( Artwork Actual Hrs for Authors Corrections ≥ Quoted Hrs for Authors Corrections, Artwork Actual Hrs for Authors Corrections )
You would color this calculation Text red through the normal field formatting options.
You would then put this calculation field on top of your Artwork Actual Hrs for Authors Corrections field.
As Phil stated, make sure that the background of this calc field is transparent.
oh wow! it works. THANK YOU. THANK YOU. SO MUCH.
You are a genious!
so exciting :smileyhappy: