Use Document ID to display image in Image Viewer?

Use Document ID to display image in Image Viewer?

Comments

  • Hi all,
    I’m having an issue trying to display an image in a Data Repeater form.
    Currently, I’m using a SQL query which is returning Document ID, but I can’t get the image viewer on a form to display this document.
    What steps can I take to transform this Document ID into something the image viewer will understand?
    [i]edited by Brendan@decisions.com on 9/18/2019[/i]

  • Hi jmcmann49,

    There is one step that will take care of this issue for you; the GetDocumentDataAsPNG step takes in data as a DocumentID and will output it as png FileData. We can build out an example here:

    First, make sure whichever png you’re using is either in the studio or, in your case, can be pulled/fetched via query. Then create a flow named say “Document to PNG Flow”. In this flow, create an input at the Start Step that will reference the Document ID string you’re grabbing. Next, place the GetDocumentDataAsPNG step from the “Steps” column on the right. Feed the Document ID into this, this will then output the DocID as png FileData.

    Now that you have this png FileData, you can use the bytes portion of the output (FileData.Contents) as the data for the image form component.
    For your case, since you’ve set up a data repeater in a form, you should see the Data Name of the image in the inputs for the form. Choose “Select from flow” and map the Bytes from the FileData to this component. And voila! You should be able to input a Document ID to this flow and have the referenced png display on each data repeater!
    [i]edited by Scott@decisions.com on 9/6/2019[/i]

  • Hi all, will appreciate to know where in the tree is located the Step GetDocumentDataAsPNG

  • Hey
    In the Flow designer, you can find this step under Integration→Internal Services→Document Service.
    [i]edited by osman@decisions.com on 6/26/2020[/i]

Sign In or Register to comment.