<?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>Related Data Not Showing up in Grid</title><link>https://community.appian.com/discussions/f/user-interface/34921/related-data-not-showing-up-in-grid</link><description>I have two instances now where related data is not showing up in a read only and editable grid. To solve this problem before, I had to create an Expression Rule to retrieve the data (not the record) for display purposes. This is the latest example. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Related Data Not Showing up in Grid</title><link>https://community.appian.com/thread/135054?ContentTypeID=1</link><pubDate>Thu, 09 May 2024 12:25:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f0810ea3-ed6c-407e-8c47-5aac01069139</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;This will evaluate the query individually for each row. I would not recommend that. If you have rows somewhere around 1-50 you would not see much impact on the performance, but when you have large amounts of data, that would definitely impact the performance.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will suggest a better work around if you want it this way. You can query the related record data in a different local variable and use the a!displayValue() or the whereContains() to index and show the value.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also i see that all the fields are readOnly. Why not use the readOnly grid and use the a!recordData() which would solve all your problems. If you are going to have any additional fields as editable then please ignore this line.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Related Data Not Showing up in Grid</title><link>https://community.appian.com/thread/135052?ContentTypeID=1</link><pubDate>Thu, 09 May 2024 12:19:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fa3c32d6-11ab-41c8-9ea0-273e19495044</guid><dc:creator>Chris.Gillespie</dc:creator><description>&lt;p&gt;I have yet to read the link you sent, I will try and get to that today.&amp;nbsp; I do see where my original JSON did not include the fv!item, but it didn&amp;#39;t seem to matter for the Non-related fields.&lt;/p&gt;
&lt;p&gt;Anyway, this is how I solved my problem.&amp;nbsp; Note the expression rules in each of the Related Data columns.&amp;nbsp; I am not sure I am doing the right thing especially if the user wants to be able to edit in the grid.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt; a!gridLayout(
            totalCount: count(local!clergyPositions),
            headerCells: {
              a!gridLayoutHeaderCell(label: &amp;quot;Position&amp;quot;),
              a!gridLayoutHeaderCell(label: &amp;quot;Organization&amp;quot;),
              a!gridLayoutHeaderCell(label: &amp;quot;City&amp;quot;),
              a!gridLayoutHeaderCell(label: &amp;quot;Term Start&amp;quot;),
              a!gridLayoutHeaderCell(label: &amp;quot;Term End&amp;quot;),
              a!gridLayoutHeaderCell(label: &amp;quot;Term&amp;quot;),
              a!gridLayoutHeaderCell(label: &amp;quot;Term Complete&amp;quot;)
            },
            columnConfigs: {
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 1),
              a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2)
            },
            rows: a!forEach(
              items: local!clergyPositions,
              expression: a!gridRowLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;Position&amp;quot;,
                    value: rule!CPMA_getRefPostionforClergyPositionId(fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.clergypositionId&amp;#39;]),
                    readOnly: true
                  ),
                  a!textField(
                    label: &amp;quot;Organization&amp;quot;,
                    value: rule!CPMA_getParishNameforClergyPositionId(fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.clergypositionId&amp;#39;]),
                    readOnly: true
                  ),
                  a!textField(
                    label: &amp;quot;City&amp;quot;,
                    value:  rule!CPMA_getParishCityforClergyPositionId(fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.clergypositionId&amp;#39;]),
                    readOnly: true
                  ),
                  a!dateField(
                    label: &amp;quot;Term Start&amp;quot;,
                    value: fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.clergypositionstart&amp;#39;],
                    readOnly: true
                  ),
                  a!dateField(
                    label: &amp;quot;Term End&amp;quot;,
                    value: fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.clergypositiontermend&amp;#39;],
                    readOnly: true
                  ),
                  a!floatingPointField(
                    label: &amp;quot;Term&amp;quot;,
                    value: fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.assignmentterm&amp;#39;],
                    readOnly: true
                  ),
                  a!textField(
                    label: &amp;quot;Term Complete&amp;quot;,
                    value: if(
                      fv!item[&amp;#39;recordType!CPMA Clergy Position.fields.clergypositiontermend&amp;#39;] &amp;lt; today(),
                      &amp;quot;Yes&amp;quot;,
                      &amp;quot;No&amp;quot;
                    ),
                    readOnly: true
                  )
                }
              )
            )
          )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Related Data Not Showing up in Grid</title><link>https://community.appian.com/thread/134969?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 16:06:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:190e1029-1b4b-4cb1-9855-553506512bd5</guid><dc:creator>Konduru Chaitanya</dc:creator><description>[quote userid="46209" url="~/discussions/f/user-interface/34921/related-data-not-showing-up-in-grid"]I had to create an Expression Rule to retrieve the data [/quote]
&lt;p&gt;Did you add the related record fields or the related record data to be queried in the expression rule. If I understand your question correctly, the solution to this would be adding those required related record fields in the query expression created.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/24.1/fnc_system_queryrecordtype.html#querying-related-record-fields"&gt;Querying related record fields&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>