Empty field show error message and unable to submit request

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 04:38 AM
Hi Team one requirement in my project
there is one field in record producer name as " Representative "(String type field) which is populate on another field "username *(reference type field )
If "Representative" value is empty, on submitting the form show the error message "Request cannot be submitted due to Representative value is empty"
anyone help me how to achieve this functionality ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 04:44 AM
Hi @Community Alums
It is more on data issue, also try with UI policy or try with catalog client script something like
rep.getvalue== ""
show error message. In UI Policy we can do this easily with message type like Info/ error / warning.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 05:05 AM
hi @Dr Atul G- LNG how to restrict for submitting the request if the value is empty user do not submit request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 05:16 AM
Hi @Community Alums
You can make it mandatory and also in pop up( error type) , user had to put the value.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 05:24 AM
Hi @Community Alums,
Write the onSubmit client script and validate your condition like
var representative= backendnameofvaraible;
if (representative == ''){// g
return false;
}
Please accept my resolution if it works for you and thumps up.
Thanks
Jitendra