What I was proposing is that we can take an array of study areas to create Dataverse option set values that can then be used to update a Dataverse row. This will make the flow less complex than using mutliple conditions or switch actions
(1) Using a table of values

A sample flow is given below.



We will use a new array to store the option set values - we can't change array items - but we can append values to a new array:



What happens to Study Area values that don't have a corresponding dataverse option set value? The flow currently ignores them. This is the area where I'm not clear on how you will handle this, but you could simply map them to a value. If the labels (from the webform) don't match any dataverse options, you can use the table to map it for you:
{
"Arts and Humanities": 166000001,
"Business": 166000002,
"Indigenous Knowledge": 16000003
"I don't know": 166000005
}
(2) Keep Study Areas where there is no option set value:



if(equals(variables('varTable')?[item()], null),item(),variables('varTable')?[item()])

(Note that the resulting array now includes a mix of integers and strings)
(3) Sorry, I still didnt understand the different submissions and how you manage them.
What I mean by this is, if there is a submission of "Arts", "Darts", "Carts"...
I think you are saying that the webform allows the user to select subject areas Arts, Darts.. etc?
We could map the "variations" of each subject area to the same values:
{
"Arts and Humanities": 166000001,
"Arts": 166000001,
"Art and Design": 166000001,
"Darts": 166000001,
"Business": 166000002,
"Indigenous Knowledge": 16000003
}


Any duplicate values from the resulting array (varDataAray) can easily be removed:

Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.