According to the code you pasted in the IF statement has been commented out.
Why not use conditional formatting on the field in question - make the fill red (or something similar) if it is empty?
And you can just put some text in white o top of the red field that only shows “fill out”, when the field is empty.
agnes b. riley
filemaker and web development
download vCard (http://www.zerobluetech.com/docs/Agnes%20B.%20Riley.vcf.zip)
TWO-TIME MAD DOG AWARD WINNER
FileMaker Certified in 10 and 11 • Member, FileMaker Business Alliance
T: 877 917-9079 . C: 917-660-7221
Store (http://store.zerobluetech.com/) | Blog (http://blog.zerobluetech.com/) | Facebook (http://www.facebook.com/zerobluetech) | Twitter (http://www.twitter.com/zerobluetech) | LinkedIn (http://www.linkedin.com/company/zeroblue-technology-solutions)
Also, make sure your calculated field is set to unstored.
I would avoid using a field for this, as fields tend to update only as data is committed and refreshed, and an unstored calc field an unnecessary addition to the table structure and overhead of the file. Such a field would have to be an unstored text result to work.
In the case you describe, either conditional formatting or the new-in-13 Hide by calculation feature would allow you to make the warning visible while the test field is empty, then disappear (or blend into the background if using conditional formatting) when it is filled in. No extra field involved.
The Hide calculation would be:
not isEmpty (PO_number)
The conditional formatting would be by calculation:
with it set by default to match the background color, but turn some bright color (red with highlighting) if left empty.
Stephen, I used your conditional and it works great.