The CreatorCon Call for Content is officially open! Get started here.

How can i limit the number of attachments in a catalog item?

Alberto27
Tera Contributor

Hello,

We have a catalog item in which we are using the OOTB attachment and we need lo limit that the user can only attach one field but the client don“t allow us to use DOM methods.

So we need to create a Catalog Client Script or something like this to limit the number of attachments.

Anyone have do this?

Thanks to all.

14 REPLIES 14

Filipe Cruz
Kilo Sage

Hello Alberto,

can you elaborate on the reason you have currently to allow only one attachment? Are you doing any kind of validation with the attachments?

Hello Filipe

We need to use only one attachment because we use this attachment in a data source with a transform map, so we need to pass only one attachment to the data source.

Best Regards

Ankur Bawiskar
Tera Patron
Tera Patron

@Alberto 

check this link

https://community.servicenow.com/community?id=community_article&sys_id=ed24c23ddb024110382a826305961...

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello Ankur,

Alberto mentioned that his client does not want to use DOM methods.
If I'm not wrong, the article that you mention contains DOM manipulation, right?

Best Regards,

Filipe