- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 06:08 AM
Hi,
What is the easiest way to achieve the following in a Catalog Client Script
1) Get current date time
2) Compare it with Date Input Variable
If Input Variable before today's date, then Show a field message.
Thank you in advance for all your answers.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 06:46 AM
Looks like its expected.
Data validation showFieldMsg not working in Service Portal - Known Error (servicenow.com)
The workaround is to use clearValue before showFieldMsg if you want the message to persist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 06:12 AM - edited 10-24-2024 06:12 AM
Hi,
You can write a Catalog ui policy as below and inthe script part write the show error
g_form.showFieldMsg('column_name','Your message','error');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 06:31 AM
Hi Anurag,
How can I clear the value please ?
When I add both scripts, the 'g_form.clearValue', disables the 'g_form.showFieldMsg'.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 06:32 AM
You can add a ui policy action on the same and add Clear Value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 06:38 AM
Hi,
Thank you for your answer.
I have tried that but the Value is cleared and I do not see the error message.
I changed the orders, but still the same...