I need to set short description in SCTASK

Udit5
Tera Contributor

Hi Team,

 

I need to set short description field in SCTASK based on the variable of a catalog item.

 

If variable option chose as 'a' then short description should be read as 'need new project in a' .

if variable option chose as 'b' then short description should be read as 'need new project in b'.

 

This can be done in flow designer script so please tell me what can i write in that short description field script.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Mahendra RC
Mega Sage

Hello,

Please check the below approach to set the short description:

You have to use the Get Catalog variables action as shown below:

find_real_file.png

Then on Create catalog task action you can use:

Without script

find_real_file.png

Using script:

find_real_file.png

var getVariableValue = fd_data._1__get_catalog_variables.<your_variable_name>;
return "Need new Project for " + getVariableValue;
 
if you have 2 separate variables (variable a and variable b)
if(fd_data._1__get_catalog_variables.variable_a) {
return "Need new Project for " + fd_data._1__get_catalog_variables.variable_a; 
} else if (fd_data._1__get_catalog_variables.variable_b) {
return "Need new Project for " + fd_data._1__get_catalog_variables.variable_b;
}

Please mark my respsone as helpful/correct, if it answer your question.

Thanks

View solution in original post

5 REPLIES 5

Anubhav24
Mega Sage
Mega Sage

If you have catalog task activity in workflow then under that catalog task activity in the script section you can use : task.short_description = 'need new project' + current.variables.<variablename>.