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 07:34 AM
You could try a before Business Rule that checks the attachment table (by table name and sys_id, as well as any name or date validation) for a file if the field is checked.
You can abort "the current database transaction. For example, if certain conditions are met, prevent the user from saving the record in the database." [1]
[1] Business Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 07:35 AM
Hello Roly,
Orlando or Before Orlando releases:
You can make use of onChange client scrpt with code mentioned in this blog:
Possible Ways for Making an Attachment Mandatory : Service Portal/Native UI
Paris Release:
There is new variable type added for service catalog, so you can use that.
Thanks,
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 07:38 AM
Please take a look at below thread:
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2020 07:42 AM
Hello Roly,
Do you want to make attachment mandatory on Sevicen Catalog Form ? If yes, you can use one of scripts available on this article and confiure it accordingly.
Possible Ways for Making an Attachment Mandatory : Service Portal/Native UI
For Record form,
You can create a before update business rule with ,current.hasAttachments() to check if attachment is avaiable or not.
if (!current.hasAttachments()) {
current.setAbortAction(true);
}
Thanks,
Abhishek Gardade
Abhishek Gardade