Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to upload files into Catalog item variables via ATF

tasankuluulu
Tera Contributor

Hello,

 

There is a Catalog Item which has few fields. Some of the fields are to upload attachments. How to upload files into these variables via ATF?

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi @tasankuluulu,

 

Yes. Follow the below steps.

Screenshot 2023-01-14 at 12.09.17 PM.png

 

1) Use the Record Query test steps. Table will be sys_attachment and add the attachment sys_id for query.

Screenshot 2023-01-14 at 12.07.30 PM.png

2) Open a catalog item

3) Set the variable values and for attachment type variable use the same sys_id.

Screenshot 2023-01-14 at 12.13.02 PM.png

 

4) Add your next steps or submit form.

 

 

Thanks,
Sagar Pagar

 

 

The world works with ServiceNow

View solution in original post

12 REPLIES 12

Sagar Pagar
Tera Patron

Hi @tasankuluulu,

 

Yes. Follow the below steps.

Screenshot 2023-01-14 at 12.09.17 PM.png

 

1) Use the Record Query test steps. Table will be sys_attachment and add the attachment sys_id for query.

Screenshot 2023-01-14 at 12.07.30 PM.png

2) Open a catalog item

3) Set the variable values and for attachment type variable use the same sys_id.

Screenshot 2023-01-14 at 12.13.02 PM.png

 

4) Add your next steps or submit form.

 

 

Thanks,
Sagar Pagar

 

 

The world works with ServiceNow

Hi @Sagar Pagar 

 

can you suggest from where you are taking sys id of attachment

Hi @Namita Rathour,

You have to take a sys_id from Attachment [sys_attachment] table. It cab be sample file's sys_id.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

yes i tried that with it its not attaching the attachment to te catalog