I know this question has been asked many times before, and I've looked through all the answers, but none of the suggested solutions work for me.
My case is slightly different in that I have a pre-built collection (in offline mode) that I am transferring to Dataverse (when back online).
I've reduced my code to just the choice field that is causing the problem.
I have a text column in my 'ncr' collection (ncrClassification) that contains "Low", "Medium" or "High" that I'm trying to transfer to a Choice column (Non Conformance Classification) in my 'Non Conformance Classification' table .
I've got it working with the below code, but this is definitely not the way to do it:
ForAll(
Filter(
ncr,
ncrAudID = Upload_Gal.Selected.audID
),
Patch(
'Non Conformance Reports',
Defaults('Non Conformance Reports'),
{
'Non Conformance Classification': Switch(
ncrClassification,
"High",
'Non Conformance Classification (Non Conformance Reports)'.High,
"Medium",
'Non Conformance Classification (Non Conformance Reports)'.Medium,
"Low",
'Non Conformance Classification (Non Conformance Reports)'.Low
),
}
)
);
Any recomendations on how I should do this without the Switch command?