How to display the selected checkbox values in task short description

Sujatha V M
Kilo Patron
Kilo Patron

Hi Team, 

I have a form that contains a checkbox values. For example:

find_real_file.png

 On selection of the checkboxes, a task gets created using a run script in the workflow.

How to set the respective selected choice as "short description" in task form even if multiple choices are selected.

Kindly help!

 

 

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.
8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sujatha,

Hope you are doing good.

Did you get a chance to check on the solution provided to resolve your query?

If your query is resolved please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

How to accomplish this requirement via flow designer?

We want to copy the only selected check box label.

Thanks

Pooja Devkar
Mega Guru

Hello Sujatha,

Try below script:

var option = '';
if (current.variables.var1.toString() == 'true') {
option = option + "Application 1,";
}
if (current.variables.var2.toString() == 'true') {
option = option + "Application 2,";
}
if (current.variables.var3.toString() == 'true') {
option = option + "Application 3,";
}
if (current.variables.var4.toString() == 'true') {
option = option + "Application 4";
}

task.short_description = "User selected" + option;

Kindly mark my answer correct & helpful; if it's useful to you.

Thanks & Regards,

Pooja Devkar

DxSherpa Technologies Pvt. Ltd

 

 

Hi Pooja,

I have a similar question too! Hoping you can guide me. Working on a catalog item which uses the Workflow Editor to manage the Workflow. 

There is a Multirow variable set that has 6-7 checkboxes. 

The business wants the Task short description to display as 'Pre Validation of' +  the value(s) of the selected checkboxes. 

I would like to add the script within the Task Advanced script if possible. 

So far what I had googled, did not seem to work. Hoping you can help.

Thank you in advance.