How to create a variable with a widget for attachment download?

Hugo Barros
Tera Contributor

Hello everyone, hope you're doing great!!

I need to provide a template download (A single Excel spreadsheet file) with a widget within a record producer variable, how can i do that the simplest way possible?

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

As your requirement is to download just one file only, Easiest ways are:

Option 1: Put the excel file as an attachment in the record producer itself and put the attachment hyperlink in the description. Downloadable attachment link would be like: https://{instance}/sys_attachment.do?sys_id={sysid from sys_attachment table}


Option 2: If you want to put it in the variable section, then go with variable type as "custom with label" and put the attachment link in the instruction box under Annotation section. Note: Check both Show help & Always Expanded boxes.

Option 3:
Widget can be created and attached to the Custom type variable. But no need of a custom widget just for a single link when the above 2 suffice the requirement without much work.

If you still prefer this, then create a new widget with html as,

<p>Please click <a title="here" href="https://{instance_name}/sys_attachment.do?sys_id={id}">here</a> to download the file</p>

Leave client & server scripts as is. Attach this widget to the Custom variable by navigating to Type Specifications > Widget

 

Let me know which one you pick 🙂

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

As your requirement is to download just one file only, Easiest ways are:

Option 1: Put the excel file as an attachment in the record producer itself and put the attachment hyperlink in the description. Downloadable attachment link would be like: https://{instance}/sys_attachment.do?sys_id={sysid from sys_attachment table}


Option 2: If you want to put it in the variable section, then go with variable type as "custom with label" and put the attachment link in the instruction box under Annotation section. Note: Check both Show help & Always Expanded boxes.

Option 3:
Widget can be created and attached to the Custom type variable. But no need of a custom widget just for a single link when the above 2 suffice the requirement without much work.

If you still prefer this, then create a new widget with html as,

<p>Please click <a title="here" href="https://{instance_name}/sys_attachment.do?sys_id={id}">here</a> to download the file</p>

Leave client & server scripts as is. Attach this widget to the Custom variable by navigating to Type Specifications > Widget

 

Let me know which one you pick 🙂

Thank you very much!!
I used the first option and it worked perfectly.

Khaja Shaik
Tera Contributor

Hi Karthik,

 

Please help with my requirement, I used the Option 1 with variable type "Rich Text Label" its working fine but I am not able to make that variable mandatory. Please provide the solution.