Skip to main content
February 28, 2023
Solved

documentViewerField not working for CSV file

  • February 28, 2023
  • 3 replies
  • 0 views

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"
),

Best answer by nareshs945

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
March 1, 2023

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"
  )
March 1, 2023

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
March 1, 2023

Thanks Naresh!