CSV file attachemnt in Catalog item

Mahesho11
Tera Contributor

In a catalog item when csv attachment is uploaded with 50 group details consists of security group name, owner, authorizer1 and authorizer2. Then it should automatically populate those values in multi row variable set. and validated 

.Is it possible if possible please explain in detail. Thanks in advance.

 

3 REPLIES 3

Kieran Anson
Kilo Patron

Hi @Mahesho11 ,

Yes this is possible, but does require a pro-code approach.

 

  1. Use an an attachment variable to request the specific csv file from the user
  2. Use an onChange client script on the attachment variable to trigger a GlideAjax call to a script include
  3. Use the sn_impex namespace APIs to parse the CSV and return the values
  4. In the ajax callback, update the multi-row variable set with the ajax response

Can you please provide me script include and client script 

Sumanth16
Kilo Patron

Hi @Mahesho11 , 

 

Please refer to below thread:

https://www.servicenow.com/community/developer-forum/attach-csv-to-catalog-item-to-populate-a-multi-...

 

@Kieran Anson provided the solution for this requirement.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda