- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 02:26 PM
Hello,
Need help setting a date/time variable (needed_by) value which is part of a variable set to auto populate SCTask "Due Date" field (due_date). I know I can achieve this from a workflow however, this variable is always going to be used as part of a variable set. I will need the variable value to auto populate the SCTask field every time based on the selection in the variable. If you can help with the script, that will go a long way.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 07:55 AM
If this variable is not included on this Catalog Task, use
current.due_date = current.request_item.variables.needed_by;
Of course the variable would also need to be populated on the RITM before the Catalog Task is created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 05:04 AM
In a workflow, on the activity that creates the Catalog Task
task.due_date = current.variables.needed_by;
or a before Insert Business Rule on the sc_task table:
current.due_date = current.variables.needed_by;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 07:32 AM
Thanks Brad for your help.
The BR worked for RITM table but it didn't work for SCTask table. I changed the order but same thing. Any idea what may be wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 07:55 AM
If this variable is not included on this Catalog Task, use
current.due_date = current.request_item.variables.needed_by;
Of course the variable would also need to be populated on the RITM before the Catalog Task is created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 08:20 AM
Once again, thank you. That fixed the issue.