<?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>Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/discussions/f/general/20469/display-data-from-editable-grid-in-one-interface-to-as-read-only-grid-in-another-interface</link><description>I have stored data in so many rows for same date in editable grid. Now I am trying to display this data as read only grid in another interface row-wise. But I am getting data of only one row and not all the rows. 
 The code related is inserted below:</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/thread/79836?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 17:41:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5ee12b15-871b-458b-93d0-d49beb9519da</guid><dc:creator>ayushimittal</dc:creator><description>&lt;p&gt;I have just implemented it and it is working as expected.&lt;/p&gt;
&lt;p&gt;Thank you for correcting issue in my code.&amp;nbsp;I was curious to know&amp;nbsp;my mistake.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/thread/79835?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 17:33:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d91c800e-4c28-4ddd-93c1-27595ea9c2bc</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Cool.&amp;nbsp; And if you did want to see what the code might look like for doing it properly in an Editable Grid, consider the following revised example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  /*local!newGridRow: &amp;#39;type!{urn:com:appian:types}Monitoring_Roster&amp;#39;(),*/
  /*local!addRow:&amp;#39;type!{urn:com:appian:types}Monitoring_Roster&amp;#39;(),*/
  local!currentRows: rule!Testing_Exp1(ri!monitoringDate),

  {
    a!gridLayout(
      label: &amp;quot;Monitoring Roster for: &amp;quot;&amp;amp; text(ri!monitoringDate,&amp;quot;dddd&amp;quot;) &amp;amp; &amp;quot; &amp;quot; &amp;amp; ri!monitoringDate,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      headerCells: {
        a!gridLayoutHeaderCell(label: &amp;quot;Monitoring Slot&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Monitoring In Charge&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Comments&amp;quot;)
      },
      columnConfigs: {
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;)
      },
      
      rows: {
        a!forEach(
          items: local!currentRows,
          expression: a!gridRowLayout(
            contents: {
              a!textField(
                label: &amp;quot;Monitoring Slot&amp;quot;,
                labelPosition: &amp;quot;ABOVE&amp;quot;,
                placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                choiceLabels: cons!Testing_TIMES,
                choiceValues: cons!Testing_TIMES,
                readOnly: true(),
                value: fv!item.monitoringSlot,
                /*value: rule!Testing_Exp1(ri!monitoringDate)[fv!index].monitoringSlot,*/
                searchDisplay: &amp;quot;AUTO&amp;quot;,
                validations: {}
              ),
              a!textField(
                label: &amp;quot;Monitoring In-Charge&amp;quot;,
                labelPosition: &amp;quot;ABOVE&amp;quot;,
                readOnly: true(),
                value: fv!item.monitoringInCharge,
                /*value: rule!Testing_Exp1(ri!monitoringDate)[fv!index].monitoringInCharge,*/
                refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                validations: {}
              ),
              a!textField(
                label: &amp;quot;Comments&amp;quot;,
                labelPosition: &amp;quot;ABOVE&amp;quot;,
                readOnly: true(),
                value: fv!item.comments,
                /*value: rule!Testing_Exp1(ri!monitoringDate)[fv!index].comments,*/
                refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                validations: {}
              )

            }
          )
          
        )
      },
      showWhen: not(isnull(ri!monitoringDate)),
      validations: {},
      shadeAlternateRows: true,
      spacing: &amp;quot;DENSE&amp;quot;,
      borderStyle: &amp;quot;STANDARD&amp;quot;
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/thread/79834?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 17:31:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04c191c7-8d81-4a13-94c2-2c5ec3e0996a</guid><dc:creator>ayushimittal</dc:creator><description>&lt;p&gt;Thank you so much for your help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have achieved it by using &amp;#39;Read Only Grid&amp;#39;. That is quite easy to implement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/thread/79833?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 17:26:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ca2bdc04-cde6-4434-8ed9-c424ebcf4561</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;So I see your core issue now.&amp;nbsp; Basically you&amp;#39;re doing a separate query for every cell of your grid.&amp;nbsp; Also the way you&amp;#39;ve done this, we would only expect one row to show in your grid, seeing as how you&amp;#39;re defining your rows by calling &lt;em&gt;a!forEach()&lt;/em&gt; onto the local!newGridRow variable, which would &lt;strong&gt;only ever&lt;/strong&gt; contain one value, so you would only ever see one row in your grid.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1614187485890v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;For this I think you need a fundamental re-write of your overall logic.&amp;nbsp; For starters, your local variables should be querying all applicable rows that you&amp;#39;d want to show, into their own local variable.&amp;nbsp; Then your grid row definition would need to iterate over this list, not re-query for every cell.&amp;nbsp; Alternatively you could use the &lt;strong&gt;Read-Only Grid&lt;/strong&gt; component, &lt;em&gt;a!gridField()&lt;/em&gt;, if you don&amp;#39;t need the functionality contained in the editable grid component here.&amp;nbsp; Sometimes it&amp;#39;s better to use an editable grid with all the rows set as read-only, but in most cases I&amp;#39;ve found this is a waste of effort.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/thread/79832?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 16:45:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f2c13fe6-2f3b-49fa-902f-940a73cd49e1</guid><dc:creator>ayushimittal</dc:creator><description>&lt;p&gt;Thank you Mike.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have Inserted the code as per your suggestion.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And regarding local!newGridRow, the data is inserting in the &amp;#39;Monitoring_Roster&amp;#39; CDT through &amp;#39;Write to Datastore Entity&amp;#39; smart service:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/447x194/__key/communityserver-discussions-components-files/11/pastedimage1614184853151v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And using the above query, I want to display the data having &amp;#39;Monitoring Date&amp;#39; as 23-Feb-2021 as read only grid while the above query is retuning the below output (row having slotId=13):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/536x77/__key/communityserver-discussions-components-files/11/pastedimage1614185055624v2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Display data from editable grid in one interface to as read only grid in another interface</title><link>https://community.appian.com/thread/79805?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 20:30:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1d5585e2-e2a2-43d4-8a5f-ad57d57b488b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;In your example above it looks like you&amp;#39;re just declaring local!newGridRow as an empty instance of your CDT.&amp;nbsp; What exactly were you expecting to happen?&amp;nbsp; Is this data being written to a database table from which you could query it when later trying to show it in read-only format?&lt;/p&gt;
&lt;p&gt;As a side note: please use the &amp;quot;Insert&amp;quot; --&amp;gt; &amp;quot;Insert Code&amp;quot; functionality available here to paste lengthy code into a convenient code box which will retain formatting/indentation, as well as prevent a single post or comment from getting overly long.&amp;nbsp; You should have the ability to edit your original post and do this if you feel like trying that &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>