Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4314 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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." ; "" )

 

 

Posted

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.

Posted

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

Posted

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

Posted

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!

 

This topic is 4314 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.