<?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>Accessing Values in Dictionary</title><link>https://community.appian.com/discussions/f/user-interface/39581/accessing-values-in-dictionary</link><description>Hi team 
 I want to access values in a dictionary without using a loop , because in real-time we have 440 rows , and each row has 150 columns . Running a loop over each row to get values is causing performance issues. 
 I checked the Appian Community</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150825?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 04:42:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:03338e98-d4cd-4a54-9639-f58a69f677da</guid><dc:creator>Goddati Venkatesh</dc:creator><description>&lt;p&gt;&lt;a href="/members/harshas2775"&gt;Harsha Sharma&lt;/a&gt;&amp;nbsp;Thank you for your time,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The approach you&amp;#39;re suggesting also works without using a nested&amp;nbsp;&lt;/span&gt;&lt;code&gt;for&lt;/code&gt;&lt;span&gt;&amp;nbsp;loop. However, we still need to call the child record inside the outer loop.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;For example, if the number of rows is 440, then we would need to call the child record 440 times. This could lead to performance issues, especially since we can&amp;#39;t load all child data at once, we have around 28,000 rows, and the record limit is 5,000.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Therefore, calling the record in each iteration of the outer loop becomes mandatory, which might impact performance.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150810?ContentTypeID=1</link><pubDate>Fri, 08 Aug 2025 18:29:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f92fb120-7464-41cf-b36f-66ed2b781177</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/venkateshg4665"&gt;Goddati Venkatesh&lt;/a&gt;&amp;nbsp; I am aware you have a solution now yet I feel I couldn&amp;rsquo;t understand your usecase properly the other day and suggested to alter your existing view as solution. Though now I think a view is not needed&amp;nbsp; /appropriate for your use case at all.&lt;/p&gt;
&lt;p&gt;Instead of a view you can query country column from the child table&amp;nbsp;by request id within Appian expression rule so that the output you receive (the country names) will be a list of strings. In your main rule where you are creating this dictionary with the countries, you can use the function joinarray() with separator as comma(,) like below.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/25.2/fnc_array_joinarray.html"&gt;joinarray&lt;/a&gt;(local!listOfCountries,&amp;rdquo;,&amp;rdquo;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here you need to replace the variable to variable that contains list of countries for given request id after querying data/ the expression rule&amp;nbsp;that returns countries from child table.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This doesn&amp;rsquo;t require a view and using a!foreach() you can get the expected output for each request id.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150770?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 11:25:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc9f49db-5eb5-4939-94a7-4cec693c1af8</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;That&amp;#39;s good to know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150769?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 11:17:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7b9603e-0aae-47e4-a203-167c7f515b34</guid><dc:creator>Goddati Venkatesh</dc:creator><description>&lt;p&gt;&amp;nbsp;Thank you all for your time,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="/members/shubhama926776"&gt;Shubham Aware&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Create an aggregated view: SELECT request_id, GROUP_CONCAT(country SEPARATOR &amp;#39;,&amp;#39;) as countries_list FROM child_table GROUP BY request_id. Returns one row per request with comma-separated countries.&lt;br /&gt;In Appian: split(local!data.countries_list, &amp;quot;,&amp;quot;).&lt;/p&gt;
&lt;p&gt;This is working fine and data loading without delay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150768?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 10:36:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e36bc05f-c04e-4120-a3e3-8c9b4475f06b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK, and then? What is the purpose of this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150762?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 09:14:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d960bf4c-b3a6-4ff0-8c31-37a59295b26b</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Say you create a view which has fields requestId and country. So when you query the view using request Id you will get the rows containing countries for that request. You will be able to access the country using dot(.) notation. For example, if you get the output of query in &lt;span style="background-color:#ffff99;"&gt;local!data&lt;/span&gt; variable, any of the below expressions can help access the country data. (Use variable/column name as in your data structure)&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffff99;"&gt;&amp;nbsp;local!data.country&lt;/span&gt;&amp;nbsp;&lt;span style="background-color:#ffff99;"&gt;or index(local!data,&amp;quot;country&amp;quot;,{}) or property(local!data,&amp;quot;country&amp;quot;,{})&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;While dot allows access column data simply, index() and property() helps in case you have a request which might have null or no country data and you will need to perform null checks.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;You won&amp;#39;t need for each to access the child data. If you want to manipulate or format them further then you might need a!foreach but that depends on usecase to usecase! Hope this helps.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150761?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 08:08:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:30998a77-a8b9-4a40-afab-ebd6c64d5c45</guid><dc:creator>Shubham Aware</dc:creator><description>[quote userid="288773" url="~/discussions/f/user-interface/39581/accessing-values-in-dictionary"]Running a loop over each row to get values is causing performance issues.[/quote]
&lt;p&gt;Simply, Use dot-notation/index/property to extract all columns at once without loops.&lt;/p&gt;
[quote userid="288773" url="~/discussions/f/user-interface/39581/accessing-values-in-dictionary"]One way i found is writing index on all 150 columns&amp;nbsp; but it will increase code length&amp;nbsp; is ther other alternative way other than this[/quote]
&lt;p&gt;Code length does NOT affect performance - only execution complexity does. Writing 150 dot notation or index() statements executes much faster than loops.&lt;br /&gt;&lt;br /&gt;Alternatively,&amp;nbsp;&lt;br /&gt;Create an aggregated view: SELECT request_id, GROUP_CONCAT(country SEPARATOR &amp;#39;,&amp;#39;) as countries_list FROM child_table GROUP BY request_id. Returns one row per request with comma-separated countries. &lt;br /&gt;In Appian: split(local!data.countries_list, &amp;quot;,&amp;quot;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150760?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 07:47:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7502b74c-aceb-4bbb-888b-67c369a28108</guid><dc:creator>Goddati Venkatesh</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;a href="/members/harshas2775"&gt;Harsha Sharma&lt;/a&gt;&amp;nbsp;If I get multiple rows for each request, then I need to run a loop on the main data and a nested loop on the child data, right? Or is my understanding incorrect?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150759?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 07:40:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a1091f5e-f631-4139-b6b9-bd1f683aedda</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;If you join the tables using request id then you will have multiple rows for each id in the view instead of columns! Querying which you can get all 120 countries as a list in Appian and wont need any loop. Did you try this way?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150758?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 07:35:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ccc59b55-37e8-437a-8191-532366d2644f</guid><dc:creator>Goddati Venkatesh</dc:creator><description>&lt;p&gt;&lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;The table has a maximum of 150 entries for each ID. For example, for request ID 1, we have 120 eligible countries, so there are 120 rows in the child table. For request ID 2, there are 50 eligible countries, so we have 50 rows in the child table.&lt;/p&gt;
&lt;p&gt;In the main table, if I have 440 rows, then in the child table I will have up to 440 &amp;times; 150 rows. To avoid this many loops, I created a view with the format mentioned above &amp;mdash; where each request ID has all countries as columns. This way, I only need to run 440 loops to get the request ID and all country values into one variable.&lt;/p&gt;
&lt;p&gt;From that variable, I want to extract&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;only the country values&lt;/strong&gt;, not other values like the request ID.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing Values in Dictionary</title><link>https://community.appian.com/thread/150757?ContentTypeID=1</link><pubDate>Thu, 07 Aug 2025 06:59:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93d9643b-23fb-4d8a-8d53-8505bb8af253</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Trying to manage 440 rows with 150 columns in memory does not feel like a good design decision.&lt;/p&gt;
&lt;p&gt;What do you try to achieve?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>