<?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>Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/discussions/f/data/22103/grid-from-record-data-indexing-out-of-grid-selection</link><description>Hello, 
 
 I&amp;#39;m displaying a selectable read-only grid on an interface, and the grid is sourced from a record type (entity-backed). Based on what row the user selects, I want to use various fields from that row elsewhere. 
 I.e., 
 
 My local!selectedRow</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/121136?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 12:38:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2011d229-cb3e-46cf-a37b-dbd7f742c41c</guid><dc:creator>Evan Rust</dc:creator><description>&lt;p&gt;I ran into this problem recently again, and figured it out - you can perform the indexing using:&lt;br /&gt;&lt;br /&gt;local!mySelectedRow[recordType!&amp;lt;recordType&amp;gt;.&amp;lt;field&amp;gt;]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/86621?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 14:20:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a49ece2f-8df6-47f8-a8cb-10d3c239c3cd</guid><dc:creator>Evan Rust</dc:creator><description>&lt;p&gt;Hi Peter, sample expression and screenshot below - was able to get past the previous error (must be indexed by corresponding fields...) by simplifying this a little.&amp;nbsp; Results from 3 things:&lt;/p&gt;
&lt;p&gt;1) Index(): doesn&amp;#39;t pink error, but doesn&amp;#39;t show anything&lt;/p&gt;
&lt;p&gt;2) Property(): pink error below&lt;/p&gt;
&lt;p&gt;3) Dot notation (not shown): Pink error saying you have to use index notation or record type&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localvariables(
  local!selectedRow,
  local!mySelection,
  local!pagingInfo:a!pagingInfo(1,10),
  {
    a!gridField(
  data:&amp;#39;recordType!{58c03cbc-9019-4e9b-ae8b-9ad9aa51b64a}Office&amp;#39;,
  pagingSaveInto: local!pagingInfo,
  columns:{
    a!gridColumn(
      label:&amp;quot;Office&amp;quot;,
      value:fv!row[&amp;#39;recordType!{58c03cbc-9019-4e9b-ae8b-9ad9aa51b64a}Office.fields.{ansofficename}ansofficename&amp;#39;]
    )
  },
  selectable: true,
  selectionValue: local!mySelection,
  selectionSaveInto: {
    a!save(local!selectedRow,index(fv!selectedRows,length(fv!selectedRows),null)),
    a!save(local!mySelection,index(save!value,length(save!value),null))
  }
),
a!textField(
  label:&amp;quot;Index&amp;quot;,
  value:index(local!selectedRow,&amp;quot;ansofficename&amp;quot;,null)
),
a!textField(
  label:&amp;quot;Property&amp;quot;,
  value:property(local!selectedRow,&amp;quot;ansofficename&amp;quot;)
)
}
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1633357127145v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/86619?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 13:55:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d6e4ae5d-8b79-4e6b-96bb-8dac93650c0c</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Evan can you post your expression that shows an error using the new record type referencing? You can use square brackets like Mike suggested or you can also use the regular index() or property() function with a record field to return the same results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/86615?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 13:42:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05600534-a647-4c76-bb7e-6221993d7fa3</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I note the documentation explains how to perform &lt;em&gt;a!queryRecordType&lt;/em&gt; calls, but then isn&amp;#39;t very clear on how to reference the results.&amp;nbsp; And Evan&amp;#39;s question seems to be more complicated still.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/86611?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 12:50:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e3bc533f-dd51-44a7-a695-a1778be94594</guid><dc:creator>Evan Rust</dc:creator><description>&lt;p&gt;I agree, Mike, the documentation is very unclear.&amp;nbsp; Unfortunately, your suggestion resulted in the same error as I encountered previously.&amp;nbsp; I did see in the documentation (that Stefan&amp;#39;s answer referenced), that Appian says that you can cast record type data to a CDT.&amp;nbsp; So, I think I&amp;#39;m going to stick with that approach for now.&amp;nbsp; I&amp;#39;m interested to hear from others, as this seems unnecessary as the record type is defined from the very entity that I&amp;#39;m casting to.&lt;/p&gt;
&lt;div style="font-weight:400;" id="mouseposition-extension-element-full-container"&gt;
&lt;div style="background:rgba(255, 255, 255, 0.7);color:#000000;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;height:0px;position:absolute;width:0px;" id="mouseposition-extension-element-rect-display"&gt;
&lt;pre style="background-color:rgba(255, 255, 255, 0.7);color:#000000;text-align:center;"&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre style="background:#ffffff;border-color:#222222 black #333333;border-radius:3px;border-style:solid;border-width:1px;color:#222222;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;line-height:14px;padding:3px;position:absolute;" id="mouseposition-extension-element-coordinate-display"&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/86566?ContentTypeID=1</link><pubDate>Sat, 02 Oct 2021 14:44:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05e828ab-2d47-4241-b359-75613af46843</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/21.3/reference-records.html"&gt;docs.appian.com/.../reference-records.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grid from Record Data: Indexing out of Grid Selection</title><link>https://community.appian.com/thread/86564?ContentTypeID=1</link><pubDate>Fri, 01 Oct 2021 21:24:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1557b3c7-de77-4081-b7f7-5bbaf480065d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The &amp;quot;record type sourced&amp;quot; notation is a little annoying in the way it&amp;#39;s different (and not well documented IMHO) - my first guess is that you could try the new notation like &amp;quot;local!myselectedRow[recordType.name]&amp;quot;.&amp;nbsp; Beyond that I&amp;#39;m not sure, and will be interested to see what others chime in with.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>