Sohail Khilji
Kilo Patron
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-29-2021 08:03 AM
★ Subscribe for Daily Email Updates ★
╔═════ ☩ ══♛══ ☩ ═════╗
Short Knowledge Article Series No.4
╚═════ ☩ ══✦══ ☩ ═════╝
Do you want to restrict future date selection ?
Do you want to restrict past date selection ?
Do you want to restrict selecting few days from now ?
etc...
Say 'BIG NO' to Scripting - For date field validation (Client Script)
Do it in the easy way, use UI policy instead of any script.
- Navigate to UI policy > Click new.
- Select the desired table as needed and use realtive condition for data field validation, you can refer the below screenshot on how i have limited future date selection. You can use the same relative condition to restrict any date validations (past, future, days, months, weeks etc...)
- I have used the script section to show field error message or info message on banner, also used the g_from.clearValue(''field,''); to clear the field after the validation.
▂ ▃ ▄ ▅ ▆ ▇ █ █ ▇ ▆ ▅ ▄ ▃ ▂
Share | Subscribe | Helpful
<<< More Articles >>>
- ServiceNow Integration with Splunk
- LDAP Integration with ServiceNow
- ServiceNow Integration with Veeam
- Handling ServiceNow flow errors with a flow
- Show parent child incident relationships - display in field message
- ServiceNow SSO Logout Error (redirects to logout page) – Reason, Fixes and Cause.
- Multi Row Variable set ServiceNow MRVS - Creating - Scripting - Example - Limits
- ServiceNow Integration with MAC vendor - Get Mac vendor for the given MAC Address.
- How to find Log4j vulnerable severs in ServiceNow Using CMDB Query Builder (SecOps)
- How to Cancel a Long-Running Transaction ServiceNow
- Hidden Features for System Administrators
Thanks,
MF Sohail Khilji.
LinkedIn > https://www.linkedin.com/in/mf-sohail-khilji/
- 1,556 Views