Download attachment from external database by clicking on the button/link

Hi,

I am using REST connectors to attact and download files into external database.

I can attach the files, and trigger the list of attachments REST to display the attachments i a section.

Can you help me how to pass the filename into the REST connector activity when i click on the attachments in the section.

ATTACHMENTS
test1.pdf
test2.dox

@VenkataVikramD I hope you are passing file name to connect rest to download attachment. Once attachment is selected in the UI, that will be set to a property. Set that property value to your page which you are using to hit connect rest.

If you are using data page to hit connect rest, use request data transform to set it.

Hi @VenkataVikramD,

If you are using data page add a parameter name as file name and pass that to rest connector by using preprocess data transform.

call that data page with the parameter name .

Thanks

@Anoop Krishna

Thanks for your reply

Yes, i am passing the attachment (file name) to the REST connector. How can I get the file name from the UI? The section has a list of attachments. I configured the attachments as link and in the actions i dont know what to use to set the filename to a property.

@VenkataVikramD okay, can you let me know what is the source of table layout? I hope it D_attachmentlist or pyattachments pagelist

@Anoop Krishna

Its AttachmentList a page list property.

@VenkataVikramD okay each of the page is having attachment info. Now on click, you will be calling a DT to hit api. Add index parameter to the DT and from the actions where the DT is called, pass .pxListSubscript to the index parameter. Now you have index of the attachment. You can just do .Attachmenist(param.index).FileName. You can set any property you want to set with the index.