How to update Switch variables in Workflow

Cory Hitchings
Giga Guru

Hi all, 

We have a workflow using a switch that determines which approval group should be selected by which application account is selected from the variables within the switch. 

A new application account addition has been requested, but when added it does not appear in the Switch command on the variable and the Switch variable is grayed out, unable to edit. 

Do I need to delete the Switch and recreate / map out all the approvals again? Does this need to be done as each addition is made?   

find_real_file.png

 

find_real_file.png

Currently working in Madrid for the next month or so.  

Thanks for the help! 

6 REPLIES 6

You may want to consider at some point making this a lookup select box.  You will need to create a table for this.  At minimum you will need a field for Name which would be the values that display in the drop-down and a reference field to to groups call it approval group.  Then you could get ride of the switch go to one approval group activity with advanced code.

var answer = [];
answer.push(current.variables.variable_name.u_approval_group);

Note you may have to add ".toString()" after u_approval_group

DrewW
Mega Sage
Mega Sage

You need to drop the switch and have one Approval - Group activity that uses a script to find the group that should be used by either using a look up table or by the selections made that trigger this workflow.

Looks like your Fire Fighter account var will do.