davidjdunn

Get (ConditionalFormattingState)…????

Discussion created by davidjdunn on Jan 30, 2015
Latest reply on Feb 4, 2015 by davidjdunn

Is there a calculation/function for determining if a field or layout object is conditionally formatted. In other words, something like “Get (ConditionalFormattingState ; Field A )” that would return a 1 or a 2.

 

Here is why this would be really cool:

 

Picture a multi-layout form. At the top of each page is a row of buttons that navigates to different layouts. In effect, it looks a bit like a web page menu bar. (I find this solution is less of a resource suck for WebDirect users.)

 

This multi-layout form is complicated. Some fields are only required if certain conditions are met. The best way I have found to make sure I get everything I need is to create a script that does two things:

 

1. The script sets a field in the table called “z_Evaluate.” Required fields are conditionally formatted to “IsEmpty (Self) and not IsEmpty (z_Evaluate).”

 

2. This is followed by a lot of “If/Else” if statements that notifies the user if data are missing and points the user to the layout it is on.

 

This works well. However, not only does the extensive conditional logic summon the gremlins of developer error, but it also means that the user may have to run the script three times if data are missing on three different layouts.

 

Then the thought occurred to me to conditionally format the header buttons too. That way the user will know that required data are missing on other layouts. But it also occurred to me that I might be able to use this method to simplify the script. Instead of thirty If/Else If statements, I could have one for each button. It would look something like

 

If [ Button A conditional formatting is “true”]

Show custom dialog; “Required info missing.”

Else if [Button B conditional formatting is “true]

Show custom dialog; “Required info missing.”

 

Etc.

 

The only problem is, I cannot figure out how to “Get” the conditional formatting state of a layout object/field. Help!

Outcomes