How to display dates dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 08:02 AM
Hi,
I have a requirement explained as below.
I have 3 date fields say (Date A, Date B and Date C) on a form. Based on date selected on Date A, the dates should be set in Date B and Date C.
For Ex: If I select Date A as today(03/17/2017) , then Date B should be set with yesterday's date(03/16/2017) and Date C should be set with "day before yesterday's date" (03/15/2017).
Please help me how can we do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 08:07 AM
You need to create GlideDate objects for each field and set date in that object and then assign that value to other field using setValue() method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 09:09 AM
Hi Andrii,
I am not much familiar with the scripting part in service now. Could you please explain the steps so that would help me out.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 09:20 AM
So, how you going to implement it then? and do you need these fields to be modified immediately while user changes one field or they need to be set after save/update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 09:48 AM
When user changes the date in Date A, it should immediately set the dates in Date B and Date C.
The functionality should not happen on save\update.