Hi All,
I’d like to perform a Javascript switch function on the data coming in from a form.
I’ve managed to use:
field(‘Disability__c’, function(state) { return ((dataValue(“disability”)(state)===“yes”)?“true”:“false”)}),
To transform “yes/no” to “true/false”, and to find and replace specific values with the following code:
field(“Race__c”,function(state){
return dataValue(“race”)(state).toString().replace(“african”,“Black”)
Still, my sense is that there must be an easiest way to do this than to simply write an extended find and replace.
Any assistance would be greatly appreciated.
Best,
Kayin