<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Displaying documents  with text in Document viewer</title><link>https://community.appian.com/discussions/f/user-interface/25774/displaying-documents-with-text-in-document-viewer</link><description>Hi every one, 
 If file is missed or corrupt, I wanna the text display &amp;quot;No find image&amp;quot; instead of text &amp;quot;Document not avaiable&amp;quot;, like image below. 
 
 
 Thanks a lots.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Displaying documents  with text in Document viewer</title><link>https://community.appian.com/thread/100610?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 05:58:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ed09fe89-8f27-4ba8-9c18-b5100e9dc2d0</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;If the file is corrupted, then there is no way to find it but if the document is not displayable, then you can use a card layout instead of the document viewer to show the message.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying documents  with text in Document viewer</title><link>https://community.appian.com/thread/100595?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 03:13:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a340195-aba5-40c3-bec7-10ec666ae720</guid><dc:creator>deepakg271869</dc:creator><description>&lt;p&gt;Document corrupt is very rare chance in Appian but to show the something else then you can use the if else condition and show the error if the condition is false.&lt;/p&gt;
&lt;p&gt;Something like below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!documentAvailable: getcontentobjectdetailsbyid(ri!docId),
  local!doc: if(
    local!documentAvailable = &amp;quot;No object with this ID has been found&amp;quot;,
    {},
    if(
      keyval(
        local!documentAvailable,
        &amp;quot;Type&amp;quot;,
        &amp;quot;: &amp;quot;,
        &amp;quot;, Created&amp;quot;
      ) = &amp;quot;Document&amp;quot;,
      document(ri!docId, &amp;quot;extension&amp;quot;),
      {}
    )
  ),
  if(
    local!doc = &amp;quot;pdf&amp;quot;,
    a!documentViewerField(
      document: todocument(ri!docId)
    ),
    a!cardLayout(
      style: &amp;quot;STANDARD&amp;quot;,
      contents: {
        a!richTextDisplayField(
          align: &amp;quot;CENTER&amp;quot;,
          value: a!richTextItem(text: &amp;quot;No find image&amp;quot;)
        )
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>