Need help with auto-populating SC_Task Due Date field with the Value from a form date field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 10:01 AM
Hello all,
I have a requirement to auto-populate the Task Due Date with the Return Call Due entered on the form.
______________________________________________________
Any help will be appreciated.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 10:15 AM - edited 04-10-2024 10:16 AM
You should be able to use a before insert business rule on the sc_task table. If this is on all tasks then it could just be as simple as using the below code.
current.due_date = current.variables.[variable name]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 10:23 AM - edited 04-10-2024 10:24 AM
Hi @Hola Ola ,
This "Due Date" is on sc_task table and "Return Call Due" part of Variables section.
In the catalog item workflow ( or Flow ) you can confgure this task level field value from catalog level field value.
In workflow, mark Advanced = checked and add the below code line under Advanced Script.
task.due_date = current.variables.return_call_due; // update the correct variable name for return_call_due
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 11:37 AM
Thanks for your response.
You mean something like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 12:42 PM
Hello @Hola Ola ,
Can you write this in your script box and try?
current.variables.return_call_due;
Regards,
Shubham