
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 02:23 AM
Hi Guys
I utilised the Glide Ajax provided by user
The link to
The Client Script I utilised:
the Script Include to go with it is a big one so I copied and pasted the section used for the above ajax:
FYI for my own function to work I had to do a GlideAjax before hand to bring back another field integer. So the reply var is simply getting an integer that I use in the add time var. I point this out only for clarification of any differences with
Now what happens when I run this is that instead of taking the date from the proposed start date field, it seems to take today's date and then run the GlideAjax (correctly) based on that:
I cant really find anything on why this would take place. All sources seem to suggest g_form.getValue() should work for a Date field, but I'm certain this is where this is going wrong. It's as though it doesn't recognize the field.
Any suggestions?
Kind Regards
Markell
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 07:06 AM
day.setDisplayValue();
NNot sure why I also had to do day.setValue() for it to work but hay 🤷
TThanks for trying anyway 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 02:33 AM
Hi,
What is in reply. Seconds, min, days, numeric value?
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 04:10 AM
Its an Integer from a table. I know the integer works as it adds that number of years.
i.e if you look at the Expiry date, A year has been correctly added but its to todays date

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 03:39 AM
Hi,
You need to use GlideDateTime object.
var day = new GlideDateTime(firstDT);
Also, print firstDT and check if its displaying correct date or not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 04:18 AM