- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 06:32 AM
I am attempting to do what I initally thought would be simple, but I just can't get it working.
I am trying to set the default value of a date field on the change_task form to match that of a date field on the parent change specified in the 'change_request' field.
first I tried javascript: current.expected_start = current.change_request.start_date;
Even after multiple attempts at slightly modifying the code to approach it differently, still nothing would populate. So I decided to go the route of script include.
Even then, it still wouldn't pull the value of the date field.
Is the script in the default value definition run on the Client or Server?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 10:18 AM
I just pit the bullet and put in script in 2 different areas (I was hoping for a single solution).
I added script in the task generation Workflow action to populate the dates from the parent Change into the Change Task.
I also implemented an onLoad client script that populates the same date fields from the parent if the date field is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 06:38 AM
Simon,
With default values I think the "current.<target_field> =" is implied.
Try...
javascript:current.change_request.start_date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 06:49 AM
This is one of the first ones I tried, but unfortunately it doesn't work.
I'm wondering if it is a problem with the timing. Perhaps when it runs, the change_request field isn't yet populated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 06:39 AM
Hi Simon,
you need to write this in a before insert business rule on change task
current.expected_start = current.change_request.start_date;
PS: make sure that the field names are correct(custom fields start with u_)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 06:49 AM
Is there any reason why the dictionary entry can't just dot walk up and grab its parent's start_date value?