Action Designer - Custom action to convert comma separated strings into array

Anish Reghu
Kilo Sage
Kilo Sage

Dear all,

Can someone suggest an action item which takes the input as comma separated strings and returns an Array?

NOTE - I need this as an custom action to be reused in the Flow Designer please.

Regards,

Anish

1 ACCEPTED SOLUTION

Akshay H Mulky
Kilo Guru

Hi Anish,

Here is the custom action to convert comma separate string to an array:

 

(function execute(inputs, outputs) {

  outputs.output_parameter = inputs.input_parameter.split(',');
  
})(inputs, outputs);

 

find_real_file.png

find_real_file.png

 

 

View solution in original post

9 REPLIES 9

surajp
Mega Guru
Use join function on the string use "," delimiter. var str = 'comma sep str'; str.join(","); // returns array

What is wrong in the above Action designed? Why is the Output variable not returning any value?

Buddy, thanks. But can you take a look at the below responses and screenshot and help me why this is not happening?

Akshay H Mulky
Kilo Guru

Hi Anish,

Here is the custom action to convert comma separate string to an array:

 

(function execute(inputs, outputs) {

  outputs.output_parameter = inputs.input_parameter.split(',');
  
})(inputs, outputs);

 

find_real_file.png

find_real_file.png