<?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>Array of documents in constant</title><link>https://community.appian.com/discussions/f/new-to-appian/18653/array-of-documents-in-constant</link><description>I would like to create a constant LIST_OF_CATEGORY_AVATARS which will contain all the images (at least their IDs) from my images folder. 
 This is the case with my excercise interface: 
 
 
 The wanted result is: if I select developer category, automatically</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Array of documents in constant</title><link>https://community.appian.com/thread/73453?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 07:37:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9e2ee62b-6e78-45e0-95a1-33e94265d903</guid><dc:creator>ivanm0004</dc:creator><description>&lt;p&gt;Thank you, Mike, for your analysis of my problem and your advices!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Array of documents in constant</title><link>https://community.appian.com/thread/73443?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 20:46:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:60abfc8f-3636-4f12-a760-560ab0fbd35c</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;For the constant-based solution, I don&amp;#39;t believe there&amp;#39;s any easy way to work around the issue of having to update the constant to account for the added images.&amp;nbsp; I would almost suggest you instead consider using an expression rule where you feed in a folder ID and it spits out the list of files found within (see&amp;nbsp;&lt;em&gt;getdocumentsfromfolder()&amp;nbsp;&lt;/em&gt;and similar OOB functions).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Array of documents in constant</title><link>https://community.appian.com/thread/73441?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 20:37:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:529b786b-31d5-462f-a277-71d61b4a3979</guid><dc:creator>ivanm0004</dc:creator><description>&lt;p&gt;I&amp;#39;ll try to explain my idea as good as I can (I&amp;#39;m fresh to Appian, so i probably won&amp;#39;t be aiming for the best practice :) ).&lt;/p&gt;
&lt;p&gt;I will have only handful of categories (these categories are just example, I would like to find the best practice for these &amp;quot;image from one component depends on text value from the other component&amp;quot; when it comes to less then 10 or 15 different values).&lt;/p&gt;
&lt;p&gt;I believe that writing of the mapping rules &amp;quot;image for value&amp;quot; can&amp;#39;t be avoided (or at least I can&amp;#39;t see better practice at the moment).&lt;/p&gt;
&lt;p&gt;So, when I have to modify expressions to map image on category, I would like to at least avoid manual addition of new images to the constant array if I can.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s say I have folder with 4 images at the moment (I believe array of image UUIDs would be the best choice because IDs may vary through the environments?) and expression for mapping these 4 images to 4 corresponding categories.&lt;/p&gt;
&lt;p&gt;At some point I add 3 new images to the folder for category avatars.&lt;/p&gt;
&lt;p&gt;Is there a way to write that&amp;nbsp;constant so it can dynamically switch from 4 elements array to 7 elements array and then the only thing that remains for me is to define new rules for 3 new categories/images? Or I have to add 3 new image UUIDs manually to the array before that step?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Array of documents in constant</title><link>https://community.appian.com/thread/73437?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 17:22:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3197ef2b-a6b4-4710-b653-5459a9cb9ab5</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;A few followup questions occur to me, before discussing best ways to handle this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What exactly is your need to store the document references (ids, etc) within a constant, specifically?&lt;/li&gt;
&lt;li&gt;Does this constant really have to reflect *all* documents in a folder?&amp;nbsp; How does the particular folder come into play here?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;How many images will the total list likely be?&amp;nbsp; Just a handful, or hundreds, or something in between?&lt;/li&gt;
&lt;li&gt;From where exactly will you derive the list of text labels used in the &amp;quot;category&amp;quot; dropdown?&amp;nbsp; Is the expectation that this will be stored like in a separate constant, or something else?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>