Make an attachment mandatory using select box choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 07:27 AM
Hi
I'm building a form to do with budgets, so there is a requirement that when an option is selected from a select box it is then mandatory to attached a exemption word docx form to the form before it can be submitted.
So if the user chooses "over £1000" I need a text box to appear underneath and then the attachment option which is on all forms needs to be then mandatory.
I can't seem to work out how to do this? Would a UI policy do it?
Cheers
Roly
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 08:05 AM
Hi Abshishek,
I only want the attachment to be mandatory if the user chooses an option from a Select Box.
So the options will be :-
Under £200
£200 - £500
£501 - £1000
£1000
If a customer selects £1000 then I need the attachment to be mandatory. The other options not mandatory.
Ideally after the £1000 option is selected an additional text box appears telling them to complete a form with a link to the form.
Thanks Roly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 08:19 AM
Hi,
you can give the condition check as well in the onSubmit script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 08:32 AM
Hi Ankur
I'm not sure what you mean here - I don't have an onSubmit Script
The name for my select box is "cost_banding" so you are saying there could be a script that looks at the select box and if the value selected is "over 1000"
Then the attachment would be mandatory? Could a text area appear then on the form advising them they have to attach a word form? and have a link to it?
I'm not great with scripts but is that what you mean?
Seems complicated to me -
Roly ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 09:44 AM
Hi,
Is this for your catalog item or your table
If this is for your table form then you can have before insert/update BR on that table which checks if any attachment is present or not.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 07:30 AM
Hi Abhishek,
I have had a look at your very helpful page om attachments but don't believe it does what I need.
I've had a think and think a way round it would be:-
On my Catalog Item (form) if the customer selects from the select box "Over £1000" then the attachment on the item becomes mandatory.
I guess an on submit script could do that by checking the value of the select box "cost_banding" and if it is "over 1000" then a information box could appear and stop the customer submitting the form unless there was an attachment.
Is that the best way to do it do you think? I'm not great with scripts .. 😞
Thanks
Roly