Selected checkbox values should be visible in sc_task description

Tuhina Sharma
Tera Contributor

Hi everyone, I have a requirement,

 

I need to display the selected checkbox variables by the user in sc_task description, I have more than 20 checkboxes, only selected checkbox variables need to display, I use set flow variable but it's now working, can you please help me on that.

 

Thanks in advance

 

TuhinaSharma_0-1712026444539.png

 

1 ACCEPTED SOLUTION

Deborah Brown L
Kilo Sage

Hi @Tuhina Sharma ,

 

You cannot get the label of a variable or a field in Flow Designer.

I can give you an alternative. Please follow the process.

Step 1: Get the variables using the "get catalog variable" action.

DeborahBrownL_0-1712038830184.png

 

Step 2: Use "Create Catalog Task" action to create the task.

DeborahBrownL_1-1712038904074.png

 

Step 3: while setting description value, use this script,

DeborahBrownL_2-1712038969401.png

 

 

var desc = '';
if(fd_data._1__get_catalog_variables.checkbox_1){
    desc += "checkbox 1 \n"; // variable name of the 1st checkbox
}
if(fd_data._1__get_catalog_variables.checkbox_2){
    desc += "checkbox 2 \n"// variable name of the 2nd checkbox
}
if(fd_data._1__get_catalog_variables.checkbox_3){
    desc += "checkbox 3 \n";  // variable name of the 3rd checkbox
}
return desc;
As we cannot get the label of the variable or field, we have to write the variable label inside condition.
 
Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me.

Regards,
Deborah Brown

View solution in original post

5 REPLIES 5

Hi @Deborah Brown L ,

I tried these exact steps and named my checkbox variables the same. I am receiving 

Error:
Invalid reference to: fd_data._1__get_catalog_variables.checkbox_1
 
Is there any additional steps needed here?