Thursday, January 17, 2019

Display the Value of a Custom Formula Field on Forms and Saved Searches


A user creates three custom checkboxes and a textfield that resolves to "Yes"if all three custom checkboxes are checked, and "No" if at least one checkbox is not checked.

1. Formula for setting the default value on thetext field 

CASE
WHEN
to_char({internal ID of checkbox1}) = 'Yes' AND
to_char({internal ID of checkbox2}) = 'Yes' AND
to_char({internal ID of checkbox3}) = 'Yes'
THEN 'Yes'
ELSE 'No'
END

2. Formula(Text)  if Yes/No must render on a saved search 

CASE
WHEN
to_char({custitem_field1}) = 'T' AND
to_char({custitem_field2}) = 'T' AND
to_char({custitem_field3}) = 'T'
THEN 'Yes'
ELSE 'No'
END

3. The only way users can get the custom fieldto display the correct result on both the record and the saved search column isto use the following formula for the custom text field:

CASE
WHEN
to_char({custitem_field1}) = any('Yes', 'T') AND
to_char({custitem_field2}) = any('Yes', 'T') AND
to_char({custitem_field3}) = any('Yes', 'T')
THEN 'Yes'
ELSE 'No'
END

No comments:

Post a Comment