Preview Files Using A Combined List Of Files and Attachments

This guide will demonstrate how to display a combined list of Files and Attachments, allowing users to preview them when selected. This example combines all files into a single list to simplify this for the end users.

  1. Initial Setup:
  • Drag and drop a “Salesforce Lookup”, a “JavaScript”, a “Hidden”, an “API Select List”, and a “Salesforce File Preview” field.
  • Rename the fields as needed.
image
  1. Configuring The “Salesforce Lookup” Field:
  • Click the pencil icon of the “Salesforce Lookup” field.
  • Set “Object” as shown below.
image
  1. Configuring The “Java Script” Field:
  • Click the pencil icon of the “Java Script” field.
  • Paste the code.
image
  • Please use this code.
  • Please make sure to update the field ID’s as per your form.
image
  1. Configuring The “API Select List” Field:
  • Click the pencil icon of the “API Select List” field.
  • Enable the Select Picker View.
image
  • Add the “Select Option Label Key” and “Select Option Value Key” as shown below.
image
  • Disable the API Call ON Page Load.
image
  • Add field ID in the “Local Data Field”.
  • Here, 4fe2-6c2a-e5b5 is the field ID of the “Hidden” field labelled “Combined File Records”.
image
  1. Configuring The “Salesforce File Preview” Field:
  • Click the pencil icon of the “Salesforce File Preview” field.
  • Set “Salesforce File Field” as shown below.
  • Save the changes.
image
  1. Test Your Form:
  • Try the form.
  • Lookup an Account.
  • The “Select File” field will display a combined list of Files and Attachments and a preview when selected.
image
[ Example ] Combined File Preview.json7.5KB

For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂