Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Want to display variables in sc_task form

MayurChaudhari
Tera Contributor

MayurChaudhari_0-1723546236114.png

I want to display the tick marked variables in sc_task form under variable section how can i do that?

 

Is following script correct?

task.short_description = 'IT Work Request For :  '+current.variables.requested_for.getDisplayValue();
    task.please_provide_a_short_description = ' ' +current.variables.please_provide_a_short_description.getDisplayValue();
 
    task.assign_to_self = ' ' +current.variables.assign_to_self.getDisplayValue();
        task.assignment_group=current.variables.assignment_group;
 
task.due_date=current.variables.please_select_date;
 
screenshot of workflow -
MayurChaudhari_2-1723546484957.png

 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron

@MayurChaudhari 

why are you setting the value to variable using task object?

why to use these 2 lines?

task.please_provide_a_short_description = ' ' +current.variables.please_provide_a_short_description.getDisplayValue();

task.assign_to_self = ' ' +current.variables.assign_to_self.getDisplayValue();

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