<?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>Segregate Entities from array of Entity data</title><link>https://community.appian.com/discussions/f/data/37300/segregate-entities-from-array-of-entity-data</link><description>Yeloow, 
 
 I am currently working in a use case, 
 I have an array of Entity data where entites from different datastores will be inside this array, 
 I want to segregate or group the entities by their datastore so I noticed one thing while trying this</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Segregate Entities from array of Entity data</title><link>https://community.appian.com/thread/139602?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 18:41:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8790ee74-b9ab-45db-be84-1240db1b362b</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;It is my understanding that&amp;nbsp;those @ values will remain consistent within the same environment, for any&amp;nbsp;&lt;strong&gt;Data Entity&lt;/strong&gt; under the same &lt;strong&gt;Data Source&lt;/strong&gt;.&amp;nbsp; But, those Entities under the Data Source can have&amp;nbsp;different structures, so grouping on this value may not provide benefit depending on your needs.&amp;nbsp; Essentially, this is just a reference # for which Data Store the Entity resides under:&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;[Data Store Entity:&amp;quot;&lt;strong&gt;DATA_ENTITY_UUID&lt;/strong&gt;@&lt;strong&gt;PARENT_DATA_STORE_REFERENCE&lt;/strong&gt;&amp;quot;]&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Data Store Entity)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But, this reference # is neither the ID or UUID of the parent Data Store.&amp;nbsp; In my environment, one reference is &amp;quot;xyx@&lt;strong&gt;5&lt;/strong&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&lt;strong&gt;1776&lt;/strong&gt;&amp;quot; where the&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;nbsp;Data Store ID is &amp;quot;&lt;strong&gt;500113&lt;/strong&gt;&amp;quot; and UUID is &amp;quot;&lt;strong&gt;_a-0000dc00-xyz..&lt;/strong&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;But, if it helps for your needs, you can extract either part of the string to retrieve the Entity UUID or Parent Data Store Reference (which does not link directly to a DS, AFAIK)..&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;  a!flatten(
    a!forEach(
      items: local!entities,
      /*expression: extract(tostring(fv!item),&amp;quot;@&amp;quot;,&amp;quot;&amp;quot;&amp;quot;&amp;quot;)*/  /* Uncomment for DS reference # */
      expression: extract(tostring(fv!item),&amp;quot;&amp;quot;,&amp;quot;@&amp;quot;) /* Entity UUID */
    )
  )&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;You will note that if you search for the reference number in /design by ID or UUID, within an application that the DS resides, it is returned.&amp;nbsp; However, if you search the overall /design environment objects for this reference #, it is NOT returned (tested on Appian 24.1).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>