Populate 'None' in a mandatory reference field if no records and allow user to submit the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 12:49 AM
Hi All,
I have a mandatory reference field called 'Select Device' if there are no device records available, then None should be displayed, and user should be able to submit the form.
Please suggest, TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 01:48 AM
Hi @Ankita9793
I don't think it's possible to submit the form by selecting OOB 'None' option on the mandatory field.
As a workaround, create one record on the reference table like below and ask the end users to use that. Also update your reference qualifier to include the " --None--" value.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 02:05 AM
That's not possible with reference field.
I won't suggest any other workaround as it would be a technical debt to have and store dummy record in that table just to achieve your requirement.
Don't make that field mandatory and allow user to submit with empty Device.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 02:54 AM
Make your field non mandatory initially.
Then you can Create Onload Client Script and call Glide Ajax to check weather the record is available or not.
Basis on the answer from Script Include you can simply make it mandatory if record available else non mandatory.
The current Advance Reference qualifier will be same you will just have Client Script and Script include to make mandatory or not.