The CreatorCon Call for Content is officially open! Get started here.

How to set values of choice and reference fields of table by flow designer accessing MRVS?

akshayp
Tera Expert

Hi ,

  I have created one flow designer that will access data from mrvs of catalog item when submitted, and will create records in one table.

  So, that table has one choice field and one reference field which were empty as i was not able to access variable from data pill.

  Now, in mrvs there will be string values for that variables ,

eg. choice will be suppose High and name will be suppose xyz.

Now i was not sure how to use  toggle script in flow action for that fields, so please help me with that so that choice and refernce fields won't remain empty

 

I was doing something like below in toggele script for choice field-

 

var sever = g_form.getValue('severity');
if(sever=='Very High'){
return "1";
}
if(sever=='High'){
return "2";
}if(sever=='Medium'){
return "3";
}if(sever=='Low'){
return "4";
}if(sever=='Very Low'){
return "5";
}

Thanks!

 

1 REPLY 1

T_Fesenko
Tera Contributor

Hey, maybe use an object with keys and values instead of this complicated "if" ladder? 

for example: 

var keyObj = { "Very High": 1,   "High": 2 ... ect..  };

This way to pass the numeric value into the flow just use keyObj[sever] where "sever" is the variable that you've described above

Regards, 

Tim