How to add Short Description in a catalog task dynamically

amleshmahato
Giga Contributor

Hi Guys,

I want short description field in the catalog task to be filled dynamically as selected by the user.

There are 4 check-boxes in my cat item- variable 1, variable 2, variable 3, variable 4.

If user selects variable 1 and variable 2 then in my task's short description, it should look like 'variable 1, variable 2'.

Is this achievable?

Thanks,

Amlesh

1 ACCEPTED SOLUTION

Deepak Kumar5
Kilo Sage

Use script like below in your workflow task activity.


var str = '';


if (current.variables.variable_1 = 'true'){


str = str + ''variable 1';


}


if (current.variables.variable_2 = 'true'){


str = str + ''variable 2';


}



task.short_description = str;


View solution in original post

3 REPLIES 3

Deepak Kumar5
Kilo Sage

Use script like below in your workflow task activity.


var str = '';


if (current.variables.variable_1 = 'true'){


str = str + ''variable 1';


}


if (current.variables.variable_2 = 'true'){


str = str + ''variable 2';


}



task.short_description = str;


Thank you very much Deepak.


It Worked with small correction- current.variables.variable_1 == 'true' instead of current.variables.variable_1 = 'true'



Thanks,


Amlesh


Annamdevula Div
Mega Explorer

I have similar issue, but I want to populate short description for different catalog items dynamically can you please suggest, for three catalog items three short descriptions