<?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>Display array values from CDT</title><link>https://community.appian.com/discussions/f/new-to-appian/24237/display-array-values-from-cdt</link><description>GM: Just learning Appian as a business analyst. I have a basic app built, one CDT integer field as a array for documents, with the subsequent Appian-generated table for the &amp;quot;many&amp;quot; if the user loads more than one document. How do I display the list of</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Display array values from CDT</title><link>https://community.appian.com/thread/93580?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 13:54:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:60c39ae7-e010-4fff-9273-20eecec0a014</guid><dc:creator>tawnal0001</dc:creator><description>&lt;p&gt;Thanks- I promise I tried but it didn&amp;#39;t work for me- I don&amp;#39;t have enough experience w the local variables. I&amp;#39;m going to review with a developer to see if we can get it working. ty!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display array values from CDT</title><link>https://community.appian.com/thread/93498?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 21:42:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:311b84f4-e899-4a88-8508-b1244e9f5fd5</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Ah yeah I just realized that pattern doesn&amp;#39;t pull data from documents - it actually has hardcoded data. You could use the document() function to find all of the properties that are displayed in that card, but it&amp;#39;s a little tricky actually getting the data to show in the right format.&lt;/p&gt;
&lt;p&gt;If you want, you could try to plug in something like this expression to replace the current definition for local!documents and it should work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;local!documents: a!forEach(
  items: rv!record[&amp;#39;recordType!Saving.fields.{folderId}folderId&amp;#39;],
  expression: a!map(
    name: document(fv!item, &amp;quot;name&amp;quot;),
    description: document(fv!item, &amp;quot;description&amp;quot;),
    uploadDate: datetext(document(fv!item, &amp;quot;dateCreated&amp;quot;), &amp;quot;MMMM d&amp;quot;),
    size: document(fv!item, &amp;quot;size&amp;quot;)/1000 &amp;amp; &amp;quot;KB&amp;quot;,
    type: a!localVariables(
      local!extension: document(fv!item, &amp;quot;extension&amp;quot;),
      a!match(
        value: local!extension,
        whenTrue: contains({&amp;quot;xls&amp;quot;, &amp;quot;xslx&amp;quot;}, fv!value),
        then: &amp;quot;excel&amp;quot;,
        whenTrue: contains({&amp;quot;doc&amp;quot;,&amp;quot;docx&amp;quot;}, fv!value),
        then: &amp;quot;word&amp;quot;,
        equals:  &amp;quot;pdf&amp;quot;,
        then: &amp;quot;pdf&amp;quot;,
        default: &amp;quot;image&amp;quot;
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will loop acroos the list of documents and identifiy properties for each document.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display array values from CDT</title><link>https://community.appian.com/thread/93497?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 21:02:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0acf7f90-1f79-4ab6-8e17-c1ff878b496e</guid><dc:creator>tawnal0001</dc:creator><description>&lt;p&gt;Thanks I like the pattern- I&amp;#39;m not very experienced with adjusting&amp;nbsp;local variables- do I replace all of them with ri!record...? I have looked at the &amp;quot;Adapt a Pattern&amp;quot; doc and I&amp;#39;m just clarifying the guidance there. ty&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display array values from CDT</title><link>https://community.appian.com/thread/93494?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 16:05:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3dd61c8f-dca6-456f-890e-c7d9d780894c</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;There&amp;#39;s also a nice pattern that you can adapt with a list of documents - it&amp;#39;s a little more complex, but I like the additional information displayed here:&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/document-list-pattern.html"&gt;docs.appian.com/.../document-list-pattern.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display array values from CDT</title><link>https://community.appian.com/thread/93493?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 15:39:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04aade83-8ff0-4199-abbd-f13a2ed79c10</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I suggest to use a!foreach() on that multiple field to dynamically create a list of a!richtextdisplayfield(). In that field, you add a richtextitem to display the text. These can take a link parameter which allows you to download the document using a documentdownloadlink().&lt;/p&gt;
&lt;p&gt;Give it a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>