<?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>Index Function vs Square Bracket</title><link>https://community.appian.com/discussions/f/best-practices/37846/index-function-vs-square-bracket</link><description>In Appian we can use a records fields by square bracket notation or index or dot notation. 
 what to use where ,what is the best practices , i heard indexing is the best.in some places its not working ,i don&amp;#39;t have clear understating</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142787?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 20:07:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3b4e785-d8f2-4cbd-b33a-5c02f14fbef2</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;I think the practical upshot most of the time is that the square brackets are far more susceptible to pink box crashes.&amp;nbsp; I&amp;#39;ve not seen a tremendous problem with using index() all the time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142769?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 14:01:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc69d66f-ec92-4210-8595-5d738106151d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Correct. The difference between a reference and the actual value is a very basic programming concept and you will find a lot of explanations in the internet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142767?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 13:44:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:752c89ef-242d-47fb-971e-6f06ee023e3c</guid><dc:creator>Dinesh Arumugam</dc:creator><description>&lt;p&gt;and&amp;nbsp;&lt;span&gt;Square brackets&amp;nbsp;&lt;/span&gt; &amp;nbsp;is a pointer or link to the original data right ?&lt;br /&gt;&lt;br /&gt;to understand this i coded : &lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/20/pastedimage1731591758377v1.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;the 6th line : its pointing to original data .&lt;/p&gt;
&lt;p&gt;but when i try to change the local!b, the original data not getting changed ,&lt;/p&gt;
&lt;p&gt;if this is wrong code plz show me a code to understand the difference between&amp;nbsp;c&lt;span&gt;opy of the data,reference&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142763?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 13:30:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:514f29a0-07df-4266-b950-6c95b6109a19</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Correct&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142758?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 12:07:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:173e5492-531f-4e02-8562-554b445669ad</guid><dc:creator>Dinesh Arumugam</dc:creator><description>&lt;p&gt;which means index&amp;nbsp;duplicating the actual values and storing them in a new memory location(local) right?&lt;br /&gt;ex : local!a : index(ri!detail,1,null)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142754?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 11:37:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b48155c-e25f-4497-9de5-8be5293cd181</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The issue with index() is, that it returns a copy of the data, but not a reference. Square brackets return a reference you can use as a saveInto target.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142750?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 10:19:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6a7f42ab-8b53-41df-8ea3-3b882153bddb</guid><dc:creator>Dinesh Arumugam</dc:creator><description>&lt;p&gt;if we use index(in target) in saveInto the null value only be saved in ri right&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142749?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 09:48:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c9d1234-e3de-49c3-b621-948a61006f23</guid><dc:creator>Dinesh Arumugam</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/20/pastedimage1731577682405v1.png" alt=" " /&gt;&lt;br /&gt;&lt;strong&gt;Its access denied&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142279?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 11:30:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3db5aace-c9a8-40b7-b49a-49d1f7690a48</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;hi &lt;a href="/members/dinesha5713"&gt;Dinesh Arumugam&lt;/a&gt;&amp;nbsp; try taking some text field component and have one saveinto with square bracket logic and another with index. you might see the difference&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142278?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 11:29:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e31e4de5-2f2d-43e1-9c03-eadc76d4d2ab</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;&lt;a id="" href="/discussions/f/general/35388/index-function-or-index-by-the-dot-in-a-variable-example-local-user-name,"&gt;https://community.appian.com/discussions/f/general/35388/index-function-or-index-by-the-dot-in-a-variable-example-local-user-name&lt;/a&gt;&amp;nbsp;This thread might help ,&lt;/p&gt;
&lt;p&gt;plus point of index function is it help&amp;#39;s in handling null values&amp;nbsp;&lt;/p&gt;
[quote userid="56759" url="~/discussions/f/best-practices/37846/index-function-vs-square-bracket/142276"]. it is crucial for using more complex data structures in saveInto where index() might not work.[/quote]
&lt;p&gt;This is the drawback of index function&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142277?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 11:23:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6efbe478-5eaf-4588-a5bc-96c8c3aacf48</guid><dc:creator>Dinesh Arumugam</dc:creator><description>&lt;p&gt;how do i test that or know and what is the different between&amp;nbsp;copy of the data and&amp;nbsp;&amp;nbsp;reference to the original data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Index Function vs Square Bracket</title><link>https://community.appian.com/thread/142276?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 10:52:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d5ad19d8-651a-4452-8d8c-1fdcdac598e0</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;hi &lt;a href="/members/dinesha5713"&gt;Dinesh Arumugam&lt;/a&gt;&amp;nbsp; There is one important difference. index() returns a copy of the data.&amp;nbsp; square-bracket-notation returns a reference to the original data. it is crucial for using more complex data structures in saveInto where index() might not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>