Is it possible to dynamically add in PDF files. | XM Community
Skip to main content
Is it possible to add in a pdf file based on a user id that the respondent selects. I have about 2,500 different pdf files that I would like for my respondents to review and each would need to drop into the survey based on an id that will be loaded into the survey.
It would be helpful if you provided more specifics. Where are the pdfs stored and how are they named? What do the ids look like and how do they relate to the pdfs?
The PDFs would be stored as individual pdf files on a secure server within my agency. They will likely be named with the same naming scheme as the id. The ids will likely be a numeric value like 12345.
So, you can build a url in the survey flow using piping and store it in an embedded data field. For example:

```

pdfurl = https://mydomain.com/${e://Field/id}.pdf

```

Then you can add a link to the url in your survey:

```

<a href="${e://Field/pdfurl}" target="_blank">pdf</a>

```

Or open it in an iframe:

```

<iframe src="${e://Field/pdfurl}"></iframe>

```

Leave a Reply