We currently have many fields in our environment which support using Groovy scripts to perform this task. However, I need some help getting started with the script.
Essentially, I need to have a script that includes/removes values from a field (instead of replacing the value) based on whether other fields contain specific values.
This is the logical pseudo code example:
IF Custom Field A contains "value 1" AND Custom Field B contains "value 2" AND “value 3” is selected in Custom Field C AND Custom Field D does NOT contain "value 4" INCLUDE “value 4” in Custom Field D
ELSE IF Custom Field A contains "value 1" AND Custom Field B contains "value 2" AND Custom Field D does NOT contain "value 5" INCLUDE “value 5” in Custom Field D