- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 04:13 AM
i have teo fields in the request form. 1. Approval
2. Approval date
if we change the Approval field value as Approved, Approval date field need to display the date.
ex: if we change approval field value as approval today, approval date field need to display today date.
similar to we we change the approval field value to approval after 2 days, approval date field need to display on that date.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 04:31 AM
Hey Siva,
The business rule solution is the quickest possible way to achieve the requirement.
In case you need it via client script, you can try using the solution provided by SnowLearns below.
please mark my solution as helpful if it somehow helped you reach your solution or to enhance your understanding.
Thanks,
Shreya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 01:33 PM
Hi siva,
You may write a before business rule with condition - when approval is approved, then in the set values or in script.. approval date : javascript: new GlideDateTime().getDate();
Please mark the answer as Helpful/Correct based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 11:23 PM
Hello Siva,
1.Create CLient callable Script Include which return current date example. getCurrnetDate().
1. Create an onChange client script on approval field and ad if condition is newVlaue == 'approved' then,
Use GlideAjax api to call getCurrnetDate() function.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 11:25 PM
Hello Siva,
1.Create Client callable Script Include with a function example. getCurrnetDate(). which return current date.
1. Create an onChange client script on approval field and add if condition if newVlaue == 'approved' then,
Use GlideAjax api to call getCurrnetDate() function and set the approval date field.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.