i do not want the onchange client script to work onload - catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 11:20 AM
i have written an onload client script on one date variable, which checks the date field on the backend database on form and populates that date . for ex date - 2024-07-24
now i want to change this date , it should not allow past date while selecting dates for same field and throw some alert. now i am trying to check it from onchange client script, but when the form loads it shows the alert and empties the previous date value which was set. can you help on this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 11:33 AM
That's easy.
There should be a line in your OnChange script that says:
if (isLoading || newValue === '')
Change that to just say:
if (newValue === '')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 11:35 AM
this is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 01:33 PM
It sounds like you will need to incorporate into the onChange script the same GlideAjax or whatever looks up the date from the database. Then wrap your existing onChange script in an if condition to not run if newValue = that date.