The CreatorCon Call for Content is officially open! Get started here.

How to set short description for catalog task for the selected job function?

Siva P
Tera Expert

Hi ,

I have catalog item with the filed called request type, it is a choice field we have multiple choices. When user selects some of the choices from the dropdown and clicks order now . Then it will create a RITM and attached with catalog task.

Now i need set the catalog task short description field with some text based on the selected choice for catalog item filed.

Please help me how to achieve this. Thanks in advance.

1 ACCEPTED SOLUTION

Hi Ankur,

I have given filter condition like below but the values which are not storing in worknotes.

 

Script:

var str = '';
if(current.u_actual_effort != '')

str = str + previous.u_actual_effort + ' ';

if(current.u_week_and_month != '')

str = str + previous.u_week_and_month;

current.work_notes = str;
})(current, previous);

View solution in original post

21 REPLIES 21

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

If Catalog Task is created by use of workflow activity then you can use something like below in the catalog task activitiy by checking the Advance checkbox & adding below line.

task.short_description=current.variables.<variables_name>;

Hi Jaspal,

Yes, the catalog task creating by use of workflow only. But the short description value is need to set based on catalog item field with selected choices only.

 

For EX: my catalog item is : User request

           I have a field in this catalog item : Type of request.

               Choices for type of req: Admin, LAP, Certification,System.

Now when user select admin  and clicks order now, it will create RITM and SCTASK. then i need set the short description value for only admin req. Rest all should be the old value. How we can do this? 

In your Catalog task activity use if-else as below.

if(current.variables.<variablenameofchoicefield> == 'admin') //dictionary value for Admin from choice
{
task.short_description='your customized short description here for admin choice selection';
}

else
{
//do nothing
}

Thanks Jaspal. Its very help full to me . In case if i have multiple choices like admin  around 15 choices how we can pass these ?