Want to display variables in sc_task form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 03:55 AM
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 -
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 05:49 AM
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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader