<?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>Getting start index should not be greater than total count</title><link>https://community.appian.com/discussions/f/general/38191/getting-start-index-should-not-be-greater-than-total-count</link><description>We are getting the expression evaluation error that start index must not be greater than total count. We got the scenario from the user when this issue is occuring. For example, there are 25 tasks in a grid. In 1st page, we will show 1 to 10 tasks, 2nd</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Getting start index should not be greater than total count</title><link>https://community.appian.com/thread/143909?ContentTypeID=1</link><pubDate>Thu, 26 Dec 2024 12:22:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:859c91fb-8905-4e25-8a4d-6bd3d49327ff</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Thanks Mike. Will try to implement the same and see if the issue is resolved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting start index should not be greater than total count</title><link>https://community.appian.com/thread/143892?ContentTypeID=1</link><pubDate>Tue, 24 Dec 2024 16:02:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8af83e3b-2901-40ee-b9ab-1b874fb62ef9</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Switch to storing your queried data in an external variable, as well as your paging info, then you will be able to make any arbitrary external user interaction modify the paging data when needed.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!pagingInfo: a!pagingInfo(1, 10, a!sortInfo(field: &amp;quot;c4&amp;quot;, ascending: true())),
  local!dataSubset: rule!TaskReportQuery(
    taskAssignment: local!taskAssignment,
    search: local!search,
    pagingInfo: local!pagingInfo,
    PM_ID: cons!TaskProcessPMID /* btw if this rule input is an integer type, it&amp;#39;ll handle casting for you */
  ),
  
  /* Grid interface code */
  a!gridField_23r3(
    label: &amp;quot;&amp;quot;,
    labelPosition: &amp;quot;ABOVE&amp;quot;,
    emptyGridMessage: &amp;quot;No Data Available&amp;quot;,
    /*pageSize: 10,*/
    data: local!dataSubset,
    /*rule!TaskReportQuery(
      taskAssignement: local!taskAssignement,
      search: local!search,
      pagingInfo: fv!pagingInfo,
      PM_ID: tointeger(cons!TaskProcessPMID)
    ),*/
    /*initialSorts: a!sortInfo(field: &amp;quot;c4&amp;quot;, ascending: true),*/
    pagingSaveInto: local!pagingInfo,
  
    ...&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting start index should not be greater than total count</title><link>https://community.appian.com/thread/143878?ContentTypeID=1</link><pubDate>Tue, 24 Dec 2024 05:13:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5844bf53-ca88-4710-a66f-4da502978564</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*Task Report Query */
a!queryProcessAnalytics(
  report: cons!REPORT_NAME,
  query: a!query(
    logicalExpression: a!queryLogicalExpression(
      operator: &amp;quot;AND&amp;quot;,
      filters: {
        a!queryFilter(
          field: &amp;quot;c14&amp;quot;,
          operator: &amp;quot;&amp;lt;&amp;gt;&amp;quot;,
          value: loggedInUser(),
          applyWhen: ri!taskAssignement = cons!NAME[2]
        ),
        a!queryFilter(
          field: &amp;quot;c17&amp;quot;,
          operator: &amp;quot;in&amp;quot;,
          value: ri!PM_ID
        ),
      },
      logicalExpressions: {
        a!queryLogicalExpression(
          operator: &amp;quot;OR&amp;quot;,
          filters: {
            a!queryFilter(
              field: &amp;quot;c4&amp;quot;,
              operator: &amp;quot;=&amp;quot;,
              value: ri!search
            )
            
          },
          ignoreFiltersWithEmptyValues: true
        ),
        a!queryLogicalExpression(
          operator: &amp;quot;OR&amp;quot;,
          filters: {
            a!queryFilter(
              field: &amp;quot;c22&amp;quot;,
              operator: &amp;quot;=&amp;quot;,
              value: loggedInUser(),
              applyWhen: ri!taskAssignement = cons!NAME[2]
            ),
            
          },
          ignoreFiltersWithEmptyValues: true()
        )
      },
      ignoreFiltersWithEmptyValues: true
    ),
    pagingInfo: ri!pagingInfo
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp;&lt;br /&gt;Please find the code snippet for the grid and task report query&lt;pre class="ui-code" data-mode="text"&gt;/* Grid interface code */

a!gridField_23r3(
  label: &amp;quot;&amp;quot;,
  labelPosition: &amp;quot;ABOVE&amp;quot;,
  emptyGridMessage: &amp;quot;No Data Available&amp;quot;,
  pageSize: 10,
  data: rule!TaskReportQuery(
    taskAssignement: local!taskAssignement,
    search: local!search,
    pagingInfo: fv!pagingInfo,
    PM_ID: tointeger(cons!TaskProcessPMID)
  ),
  initialSorts: a!sortInfo(field: &amp;quot;c4&amp;quot;, ascending: true),
  columns: {
    a!gridColumn(
      label: &amp;quot;Column 1&amp;quot;,
      sortField: &amp;quot;c4&amp;quot;,
      value: if(
        a!isNullOrEmpty(fv!row.c4),
        null,
        fv!row.c4
      ),
      align: &amp;quot;CENTER&amp;quot;
    ),
    a!gridColumn(
      label: &amp;quot;Column 2&amp;quot;,
      sortField: &amp;quot;c5&amp;quot;,
      value: if(
        a!isNullOrEmpty(fv!row.c5),
        null,
        fv!row.c5
      ),
      align: &amp;quot;CENTER&amp;quot;
    ),

    a!gridColumn(
      label: &amp;quot;Column 3&amp;quot;,
      sortField: &amp;quot;c10&amp;quot;,
      value: if(
        a!isNullOrEmpty(fv!row.c10),
        null,
        a!linkField(
          links: {
            a!processTaskLink(
              label: fv!row.c10,
              task: fv!identifier,
              openLinkIn: &amp;quot;SAME_TAB&amp;quot;
            )
          }
        )
      ),
      align: &amp;quot;CENTER&amp;quot;
    ),
    a!gridColumn(
      label: &amp;quot;Column 4&amp;quot;,
      sortField: &amp;quot;c6&amp;quot;,
      value: if(
        a!isNullOrEmpty(fv!row.c6),
        null,
        fv!row.c6
      ),
      align: &amp;quot;CENTER&amp;quot;,
      width: &amp;quot;MEDIUM&amp;quot;
    ),
    a!gridColumn(
      label: &amp;quot;Column 5&amp;quot;,
      sortField: &amp;quot;c7&amp;quot;,
      value: if(
        a!isNullOrEmpty(fv!row.c7),
        null,
        fv!row.c7
      ),
      align: &amp;quot;CENTER&amp;quot;
    ),
    a!gridColumn(
      label: &amp;quot;Column 6&amp;quot;,
      sortField: &amp;quot;c12&amp;quot;,
      value: fv!row.c18,
      align: &amp;quot;CENTER&amp;quot;
    ),
  },
  selectable: true(),
  selectionValue: local!selection,
  selectionSaveInto: {
    local!selection,
    a!save(
      local!selectedtask,
      append(local!selectedtask, fv!selectedRows)
    ),
    a!save(
      local!selectedtask,
      difference(local!selectedtask, fv!deselectedRows)
    )
  },
  disableRowSelectionWhen: local!taskAssignement = cons!TASKS[1],
  showWhen: not(
    or(
      local!taskAssignement = cons!TASKS[3],
      local!taskAssignement = cons!TASKS[4]
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting start index should not be greater than total count</title><link>https://community.appian.com/thread/143835?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2024 15:16:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:09c02e6e-5425-4397-9507-7c5b7bcec75f</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Then you&amp;#39;ll need to post your code snippet showing how you construct your grid as well as how you&amp;#39;re doing your task report query.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re just talking about the corner case described where 2 users are picking tasks from the same queue and the &amp;quot;go to last page&amp;quot; functionality causes an error for user B when user A has accepted the one task needed to make the page count drop, then I think you might just be in a situation where you need to do a periodic data refresh on the queried data (like set up a auto refresh with value 0.5 for instance).&amp;nbsp; Otherwise I&amp;#39;m not sure you&amp;#39;ll be able to elminate this case completely, but also, how often will this realistically actually happen to users in the wild, when they&amp;#39;re not looking to demonstrate an error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting start index should not be greater than total count</title><link>https://community.appian.com/thread/143799?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 10:02:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5b4d89fd-74e0-4b01-adda-1d620a3151ba</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;br /&gt;&lt;br /&gt;Any suggestion would be helpful on how to reset it because the paginginfo is calculated automatically by the grid using fv!paginginfo which is being as paginginfo parameter to the query. The icons are also provided by the grid. So I am not able to understand how to reset it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting start index should not be greater than total count</title><link>https://community.appian.com/thread/143773?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 15:25:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bb49bd5a-f93b-4545-89de-9b839e987ce0</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You will have to reset the startIndex when doing any actions that could potentially reduce the number of items. Or you add a validation on the startIndex that resets it in such a case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>