<?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>Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/discussions/f/data/34949/data-only-populates-after-clicking-custom-pagination-arrow</link><description>Hello, 
 I am troubleshooting an issue I have with a GRID where there is no data populating the GRID when I load the page but after clicking one of the custom pagination arrows we have, the data populates but then we can&amp;#39;t click the arrow to go to the</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135166?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 18:54:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5aaab3d6-f5af-4a8f-a6d9-7aa7a9ea09b8</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="249979" url="~/discussions/f/data/34949/data-only-populates-after-clicking-custom-pagination-arrow/135162"]developers were on it for about 1 year[/quote]
&lt;p&gt;been there.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;IMHO you need to really drill down on that initial query.&amp;nbsp; What&amp;#39;s your initial value for ri!pagingInfo?&amp;nbsp; The initial query seems to be referring to an RI value and not a locally declared one.&lt;/p&gt;
&lt;p&gt;Going forward I&amp;#39;d also suggest that your custom paging info controls don&amp;#39;t really need to re-call the entire query for each page load, if the whole thing is structured properly - you should be able to have it save an updated paging value and use variable chaining to have that refresh the top-level value.&amp;nbsp; But since that messes with your current setup (and isn&amp;#39;t your current problem) i&amp;#39;d suggest solving your current problem first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135164?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 18:45:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11b6ec13-a99d-4ea4-926b-777fab0a7c6e</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;nice ! noted his name down :D&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135162?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 18:42:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b2dd921c-2ba1-46e5-90ff-e6ba613b3328</guid><dc:creator>thomasewood95</dc:creator><description>&lt;p&gt;I&amp;#39;m not so sure.. because the weird part is that when I load into the view.. you can see on the right side of this screenshot that the data for fcaReportDetails is all null. And then if I click on the custom pagination arrows we have after clicking one of the arrows data appears and you can see on the right side of the 2nd screenshot that data is now in there after clicking a custom pagination arrow?&lt;/p&gt;
&lt;p&gt;No data on loading in to the view:&lt;br /&gt;&lt;br /&gt;&lt;img style="height:361px;max-height:361px;max-width:588px;" alt=" " height="342" src="/resized-image/__size/1176x722/__key/communityserver-discussions-components-files/16/pastedimage1715366396636v1.png" width="587" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;data after clicking on the custom pagination arrows above the GRID:&lt;/p&gt;
&lt;p&gt;&lt;img style="height:334px;max-height:334px;max-width:611px;" alt=" " height="334" src="/resized-image/__size/1222x668/__key/communityserver-discussions-components-files/16/pastedimage1715366436949v2.png" width="610" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see here, I know that the data is able to be retrieved because of this.. but unsure why there is no data on the initial load in.. it also seems that it shows 1 page of 30 items of data and I can&amp;#39;t go to the next page using the arrows after that first click. This is what made me think it was something in the custom pagination code I share in the original post.&lt;/p&gt;
&lt;p&gt;Trust me I understand how much of a headache all of this may look.. I am the only developer on this project after other developers were on it for about 1 year, so most of it was not created by me but rather maintained and updated/improved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135161?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 18:34:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:003eb3ce-a502-439b-be4e-4d1e65e9ebfd</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="249979" url="~/discussions/f/data/34949/data-only-populates-after-clicking-custom-pagination-arrow/135155"]fcaReportDetails get initialized as a local variable[/quote]
&lt;p&gt;That looks OK (no comment about undue convolutedness though... *headache.gif*), but how sure are you that it&amp;#39;s actually getting initialized (at that level) with an actually correct data value?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135160?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 18:31:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:adb3d1ee-3172-408c-b754-a982c4f27907</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;cool, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135159?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 18:06:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1bb85a7e-8997-408a-a543-b0b02945d8df</guid><dc:creator>Gus Lines</dc:creator><description>&lt;p&gt;It should be&amp;nbsp;viewable now! Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135156?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 17:39:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae07204b-5829-4eee-9dcd-9ddf8c6e9afb</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;&lt;a href="/members/gus.lines"&gt;Gus Lines&lt;/a&gt; can you un-spam the OP&amp;#39;s reply to my comment?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135155?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 17:13:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ca49465d-5e44-487e-860d-892f13472706</guid><dc:creator>thomasewood95</dc:creator><description>&lt;p&gt;Here is the code of the view that contains the GRID code you are referring to:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!podCode: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!orderId: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!vertInvestmentDesc: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!tradeQuantity: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!execPrice: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!ccy: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!principalAmount: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!usdRate: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!gbpRate: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!usdValue: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!bbTicker: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!vertAssetType: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!vertTraderCode: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!vertExecSide: a!refreshVariable(
    value: null(),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!fcaReportDetails: a!refreshVariable(
    value: todatasubset(
      rule!TB_RULE_castToFcaReportCdt(
        data: rule!TB_SP_executeSQlStatement(
          sqlStatement: rule!TB_RULE_generateSQLStatementForFcaReport(
            podCode: local!podCode,
            orderId: local!orderId,
            vertInvestmentDesc: local!vertInvestmentDesc,
            tradeQuantity: local!tradeQuantity,
            execPrice: local!execPrice,
            ccy: local!ccy,
            principalAmount: local!principalAmount,
            usdRate: local!usdRate,
            gbpRate: local!gbpRate,
            usdValue: local!usdValue,
            bbTicker: local!bbTicker,
            vertAssetType: local!vertAssetType,
            vertTraderCode: local!vertTraderCode,
            vertExecSide: local!vertExecSide,
            pagingInfo: ri!pagingInfo,
            getTotalCount: true()
          )
        )
      )
    ),
    refreshOnVarChange: { ri!refreshValue }
  ),
  local!totalCount: a!refreshVariable(
    value: index(
      rule!TB_SP_executeSQlStatement(
        sqlStatement: rule!TB_RULE_generateSQLStatementForFcaReport(
          podCode: local!podCode,
          orderId: local!orderId,
          vertInvestmentDesc: local!vertInvestmentDesc,
          tradeQuantity: local!tradeQuantity,
          execPrice: local!execPrice,
          ccy: local!ccy,
          principalAmount: local!principalAmount,
          usdRate: local!usdRate,
          gbpRate: local!gbpRate,
          usdValue: local!usdValue,
          bbTicker: local!bbTicker,
          vertAssetType: local!vertAssetType,
          vertTraderCode: local!vertTraderCode,
          vertExecSide: local!vertExecSide,
          pagingInfo: ri!pagingInfo,
          getTotalCount: true()
        )
      ),
      &amp;quot;TOTALCOUNT&amp;quot;,
      null()
    ),
    refreshOnVarChange: { ri!refreshValue }
  ),
  {
    rule!TB_SEC_fcaReportFilters(
      pagingInfo: ri!pagingInfo,
      totalCount: local!totalCount,
      podCode: local!podCode,
      vertInvestmentDesc: local!vertInvestmentDesc,
      fcaReportDetails: local!fcaReportDetails,
      tradeQuantity: local!tradeQuantity,
      execPrice: local!execPrice,
      ccy: local!ccy,
      usdRate: local!usdRate,
      gbpRate: local!gbpRate,
      usdValue: local!usdValue,
      bbTicker: local!bbTicker,
      vertAssetType: local!vertAssetType,
      vertTraderCode: local!vertTraderCode,
      vertExecSide: local!vertExecSide,
      orderId: local!orderId,
      principalAmount: local!principalAmount
    ),
    a!cardLayout(
      contents: {
        rule!TB_SEC_fcaReportAdditionalAction(
          totalCount: local!totalCount,
          podCode: local!podCode,
          orderId: local!orderId,
          vertInvestmentDesc: local!vertInvestmentDesc,
          tradeQuantity: local!tradeQuantity,
          execPrice: local!execPrice,
          ccy: local!ccy,
          principalAmount: local!principalAmount,
          usdRate: local!usdRate,
          gbpRate: local!gbpRate,
          usdValue: local!usdValue,
          bbTicker: local!bbTicker,
          vertAssetType: local!vertAssetType,
          vertTraderCode: local!vertTraderCode,
          vertExecSide: local!vertExecSide
        ),
        rule!TB_GRID_fcaReportView(
          fcaReportDetails: local!fcaReportDetails,
          podCode: local!podCode,
          vertInvestmentDesc: local!vertInvestmentDesc,
          tradeQuantity: local!tradeQuantity,
          execPrice: local!execPrice,
          ccy: local!ccy,
          usdRate: local!usdRate,
          gbpRate: local!gbpRate,
          usdValue: local!usdValue,
          bbTicker: local!bbTicker,
          vertAssetType: local!vertAssetType,
          vertTraderCode: local!vertTraderCode,
          vertExecSide: local!vertExecSide,
          orderId: local!orderId,
          principalAmount: local!principalAmount,
          totalCount: local!totalCount,
          recordLock: ri!recordLock,
          lockingDetails: ri!lockingDetails
        )
      },
      marginAbove: &amp;quot;STANDARD&amp;quot;
    )
  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can see in this code that fcaReportDetails get initialized as a local variable:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;local!fcaReportDetails: a!refreshVariable(
    value: todatasubset(
      rule!TB_RULE_castToFcaReportCdt(
        data: rule!TB_SP_executeSQlStatement(
          sqlStatement: rule!TB_RULE_generateSQLStatementForFcaReport(
            podCode: local!podCode,
            orderId: local!orderId,
            vertInvestmentDesc: local!vertInvestmentDesc,
            tradeQuantity: local!tradeQuantity,
            execPrice: local!execPrice,
            ccy: local!ccy,
            principalAmount: local!principalAmount,
            usdRate: local!usdRate,
            gbpRate: local!gbpRate,
            usdValue: local!usdValue,
            bbTicker: local!bbTicker,
            vertAssetType: local!vertAssetType,
            vertTraderCode: local!vertTraderCode,
            vertExecSide: local!vertExecSide,
            pagingInfo: ri!pagingInfo,
            getTotalCount: true()
          )
        )
      )
    ),
    refreshOnVarChange: { ri!refreshValue }
  ),&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And then towards the bottom when TB_GRID_fcaReportView gets called the rule input fcaReportDetails gets set to the local variable we initialized above:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;rule!TB_GRID_fcaReportView(
          fcaReportDetails: local!fcaReportDetails,
          podCode: local!podCode,
          vertInvestmentDesc: local!vertInvestmentDesc,
          tradeQuantity: local!tradeQuantity,
          execPrice: local!execPrice,
          ccy: local!ccy,
          usdRate: local!usdRate,
          gbpRate: local!gbpRate,
          usdValue: local!usdValue,
          bbTicker: local!bbTicker,
          vertAssetType: local!vertAssetType,
          vertTraderCode: local!vertTraderCode,
          vertExecSide: local!vertExecSide,
          orderId: local!orderId,
          principalAmount: local!principalAmount,
          totalCount: local!totalCount,
          recordLock: ri!recordLock,
          lockingDetails: ri!lockingDetails
        )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data only populates after clicking custom pagination arrow</title><link>https://community.appian.com/thread/135154?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 16:42:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f707983-33c6-45ec-9c6a-60483e6dc662</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;What are you passing in as the initial value of ri!fcaReportDetails?&amp;nbsp; If you&amp;#39;re not initializing it to contain the first page of data, then a blank initial value would be the expected behavior IMHO.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/pastedimage1715359319796v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>