Sohail Khilji
Kilo Patron

★ 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.

find_real_file.png

find_real_file.png

 

< Next Post                                                      Previous Post >  

 

▂ ▃ ▄ ▅ ▆ ▇ █ █ ▇ ▆ ▅ ▄ ▃ ▂

Share | Subscribe | Helpful

 

 

           <<<  More Articles  >>>

  1. ServiceNow Integration with Splunk
  2. LDAP Integration with ServiceNow
  3. ServiceNow Integration with Veeam
  4. Handling ServiceNow flow errors with a flow
  5. Show parent child incident relationships - display in field message
  6. ServiceNow SSO Logout Error (redirects to logout page) – Reason, Fixes and Cause.
  7. Multi Row Variable set ServiceNow MRVS - Creating - Scripting - Example - Limits
  8. ServiceNow Integration with MAC vendor - Get Mac vendor for the given MAC Address.
  9. How to find Log4j vulnerable severs in ServiceNow Using CMDB Query Builder (SecOps) 
  10. How to Cancel a Long-Running Transaction ServiceNow
  11. Hidden Features for System Administrators

 

Thanks,

MF Sohail Khilji.

LinkedIn >   https://www.linkedin.com/in/mf-sohail-khilji/

 

Version history
Last update:
‎12-29-2021 08:03 AM
Updated by: