January 30, 201312 yr Hi all Apologies if this is way to trivial for all of you seasoned experts. I have wrote this script but it does not work. Any ideas of I can get this to function. The field for carbonvalue works fine and all I need this to do is bring up in red text the below warning if no value is added in to the field below. If (IsEmpty (carbonvalue); "WARNING! The field for carbonvalue is empty. Please inset appropriate value before proceeding." ; "" )
January 30, 201312 yr You will need to create a calculation field with the calculation If (IsEmpty (carbonvalue); TextColor("WARNING! The field for carbonvalue is empty. Please inset appropriate value before proceeding."; RGB(255;0;0)) ; "" ) or you can use your calculation and attach conditional formatting to the field, with the condition being a formula PatternCount(self; "WARNING") and set text color to red in the dialog. The first solution makes the text color change in the field on any layout; the second only affects the specified field on the current layout.
January 30, 201312 yr Author Thanks Doughemi. If the field is one of a repeating field, do you know how I can use this to cover all of the cells in that repeating field such as using "extend" Something like the below If (IsEmpty (carbonvalue); Extend(TextColor("WARNING! The field for carbonvalue is empty. Please inset appropriate value before proceeding."; RGB(255;0;0))) ; "" ) Thanks
January 30, 201312 yr DON'T use repeating fields for this kind of data! Using them makes this kind (and every other kind) of reporting very difficult and convoluted. I assume you have a number of carbonvalues for a particular site/process/user/customer/supplier or whatever. Each site should have a unique ID. You should have a Carbon table with a field for SiteID, along with fields for whatever other data is unique to THIS carbon value at THIS site at THIS reading. The Site table should be related to the Carbon table by Site::ID=Carbon::SiteID See the attached example Carbon.fp7.zip
January 31, 201312 yr Author Hi Doughmei Thanks but the system was set up long ago as repeating fields so I am stuck at the moment. We did have a filemaker expert come in to take a look to convert using portals etc but the DB did not talk to each other. I have used extend for some other scripts but not sure how I can build this in to the one you have written. Over the years there have been many iterations of thsi system updating each year but probably the whole system needs rewriting which is way beyond me!
Create an account or sign in to comment