<?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>How to retrieve rows from entity data type</title><link>https://community.appian.com/discussions/f/general/25547/how-to-retrieve-rows-from-entity-data-type</link><description>I have a data with following format- 
 
 [ entity : somevalue , data :[id:1,name:a],[id=2,name:b] 
 Now i need to pass data part in loop. As it has 2 occurrences for data so loop should run two times. And for each occurrence it should pas only relevant</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99669?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 05:34:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d5207fbe-2dd5-4b0e-9ba7-ddd3ada46e03</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;&lt;a href="/members/piyusha6151"&gt;piyusha6151&lt;/a&gt;, You need to index the data as it is a non-scaler type. I have modified Chris&amp;#39; code and attached it below. Try using it..&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: a!entityData(
    entity: cons!COE_DS_SAMPLE,
    data: {
      {id: 1, name: &amp;quot;test 1&amp;quot;},
      {id: 2, name: &amp;quot;test 2&amp;quot;}
    }
  ),

  a!forEach(
    items: local!data[1].data,
    expression: {
      /* each data set can be utilized here */
      fv!item
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99663?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 03:00:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:67ff4a5c-8943-44bc-9d01-455985134469</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;Something like below?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1660791623584v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;&lt;span&gt;entityDataPV rule input, i used the below code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!entityData(
  entity: cons!UAS_DSE,
  data: {
    &amp;#39;type!{urn:com:appian:types:UAC}UAC_UAS_Onboard_Data&amp;#39;(
      uniqueassetid: 1,
    ),
    &amp;#39;type!{urn:com:appian:types:UAC}UAC_UAS_Onboard_Data&amp;#39;(
      uniqueassetid: 2,
    ),
    &amp;#39;type!{urn:com:appian:types:UAC}UAC_UAS_Onboard_Data&amp;#39;(
      uniqueassetid: 3,
    ),
    &amp;#39;type!{urn:com:appian:types:UAC}UAC_UAS_Onboard_Data&amp;#39;(
      uniqueassetid: 4,
    )
  }
)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99661?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 02:35:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7416d029-a76c-4b5a-9b9a-aba6326bf6f4</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;could you please show the structure of your entityDataPV? what type of value it contains we want to see that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99659?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 20:07:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:556314e7-918f-4d0e-9774-f49af00025ee</guid><dc:creator>piyusha6151</dc:creator><description>&lt;p&gt;in my process, Process variable is entitydata type and contains entity value and data (multiple).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now if i configure the above way then getting-&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!data: ri!entityDataPV,&lt;br /&gt; &lt;br /&gt; a!forEach(&lt;br /&gt; items: local!data.data,&lt;br /&gt; expression: {&lt;br /&gt;&lt;br /&gt; fv!item&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cannot index &amp;quot;data&amp;quot; because it is an array type (List of variant). Only fields with scalar types can be indexed from an array&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99658?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 18:37:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0bb47aed-e744-4a52-af51-fb97d14a59a1</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;deepakg&amp;#39;s example is essentially it, here&amp;#39;s the same just with a specific Entity Data type utilized.&amp;nbsp; What are you doing with the data?&amp;nbsp; Passing it where?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!data: a!entityData(
    entity: cons!COE_DS_SAMPLE,
    data: {
      {id: 1, name: &amp;quot;test 1&amp;quot;},
      {id: 2, name: &amp;quot;test 2&amp;quot;}
    }
  ),
  
  a!forEach(
    items: local!data.data,
    expression: {
      /* each data set can be utilized here */
      fv!item
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99657?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 18:11:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:69026d8b-2a68-4455-a755-2289a38f09b7</guid><dc:creator>piyusha6151</dc:creator><description>&lt;p&gt;That didn&amp;#39;t help as process is receiving process variable of entity type. As per your example, issue is to get data part of local!data&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to retrieve rows from entity data type</title><link>https://community.appian.com/thread/99656?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 17:11:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b3c16014-f53c-42da-b5fc-b8cef24c74ae</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;Could you please try the below Code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: a!map(
    entity: &amp;quot;Some Entity&amp;quot;,
    data: { { id: 1, name: &amp;quot;ABC&amp;quot; }, { id: 2, name: &amp;quot;DEF&amp;quot; } }
  ),
  a!forEach(
    items: local!data.data,
    expression: {
      entity: &amp;quot;Some Entity&amp;quot;,
      data:fv!item
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>