So as you can see in the above pic i have 2 different fields and for both the fields i have used multiple dropdown option and i have used the same functions for them. But unfortunately, the multiple dropdown is working only for the status field and not working for the commitment field. i.e, when i try to select more than one option in the multiple dropdown field, it shows an error.
.
"Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!wizardLayout [line 3]: A multiple dropdown component [label="Commitment"] has an invalid value for "value". All selected values must be present in the choiceValues array, but value was Career Growth and Learning; Work-Life Balance and choiceValues was Career Growth and Learning; Work-Life Balance; Environment Sustainability."
Can anyone help me out with where i did the mistake.
Discussion posts and replies are publicly visible
For Status you are using a local variable while for Commitment field you are using a record field reference.
One field of a record isn't designed to store an array. So you should have a separate record to store commitments for each job posting. You can build a relationship between the two records as they relate Many-to-one.
So create another local variable to save commitment data just like you did for Status. When user submits or save the form then map the selected data into rule input. E.g.
To sum up: local!benefits is a local variable which can hold nearly any type of data when saved-into, meaning it correctly receives (and stores) the array of data it gets from the multiple dropdown. Whereas the ".commitment" field in a (single) "ri!record" reference will likely be a non-array string, meaning the dropdown is attempting to save an array of text into a singular value.
I guess first you need to decide what your desired behavior is here. Does a single ".commitment" within a single instance of "ri!record" really need to hold an array of values? Or are you expecting something else to happen?