Skip to main content
Known Participant
Feb 28, 2023 10:04 PM UTC
Solved

documentViewerField not working for CSV file

I am attempting to display a CSV file stored in CDT in the UI using the documentViewerField. Here is the code.

However, I just get a blank rectangle in the UI. Does the documentViewerField component not work for CSV files?

a!documentViewerField(
label: index(ri!variable, "documentName", {}),
document: index(ri!variable, "document", {}),
height: "TALL"
),

Inspiring
Mar 1, 2023 4:46 AM UTC

Document viewing behavior differs depending on the document type and browser. Some documents are automatically download(ex: word) to your system when you try to open using document viewer. See the limitations of documents viewer here

https://docs.appian.com/suite/help/22.4/Document_Viewer_Component.html#viewing-documents-on-different-devices

3 replies

abhayd3663
Brainy
Mar 1, 2023 2:25 AM UTC

What type of input ri!variable is? if it is document type of variable use following.

a!documentViewerField(
    label: document(ri!variable, "name"),
    document: ri!variable,
    height: "TALL",
    altText: "alt text"
  )
Inspiring
Mar 1, 2023 4:46 AM UTC

Document viewing behavior differs depending on the document type and browser. Some documents are automatically download(ex: word) to your system when you try to open using document viewer. See the limitations of documents viewer here

https://docs.appian.com/suite/help/22.4/Document_Viewer_Component.html#viewing-documents-on-different-devices

walkersAuthor
Known Participant
Mar 1, 2023 7:34 PM UTC

Thanks Naresh!