Clicking on the last page/record returns an error attached.

Hello All,

I have created a Portal All task report, and then created a tempo report of that Portal report using a!queryProcessAnalytics. All the filters and pagination is working fine, but when I click on to get the last page/record then it returns an error attached.

Let me know what could be the error, is it something to do with Engine, which is not able to fetch the last page.

Note: The task report has nearly 20000 rows.

Regards,
Vinit.

Portal Report Error.docx

OriginalPostID-155336

OriginalPostID-155336

  Discussion posts and replies are publicly visible

  • @vinitl Is the report represented by cons!ALL_TASK_REPORT a main report (not the one that contains grouping information)?

    Please let me know the answer to the above question. Mean while I will formulate a psuedocode for you, as the code snippet attached by you isn't shielded from the error caused by trespassing 10000 limit.
  • Yes, you are correct, ALL_TASK_REPORT fetches all the tasks in the system, this report also includes date, year , and day columns. Whereas other report contains groupby on year,month,day.
  • Mean while I present a psuedocode, I would like to give a hint - As and when the a!queryprocessAnalytics see the 10000+ index, it starts throwing an error. So the call to a!queryprocessAnalytics should be always shielded from sending an 10000+ index by opting for alternate approaches such as which we are discussing here. Simply speaking, as and when your pagingInfo is set to an index greater than 10000+, you should do as follows:
    1. Fetch the whole dataset by calling a!queryProcessAnalytics iteratively (with the filters present on interface and with the filters obtained from the grouping report)
    2. Using the todatasubset with the pagingInfo used in the grid, you should obtain the required data and provide it back to the grid.

    In this way we should shield the actual a!queryProcessAnalytics call to original report by making use of the filters (user defined filters and with filters obtained from grouping report).
  • Okay, May be a psuedocode of this can give me a clear picture. As this seems to be very confusing.
  • @vinitl Hi, I have just put forward one more approach (simpler for you rather - Creation of one rule and including it in any place that you want to query analytics) and attached the updated main rule of yours accordingly. Please go through them and let me know if you have questions or issues.

    Added to above, I would like to make some comments about the implementation of the attached main rule of yours:
    1. It would be good to construct a filterset and thereby query the analytics upon interaction with the filters or paging grid rather than having these in with(). Becausee having these in with() causes the query evaluation and the filterset construction every time.
    2. I would like to suggest to opt for a different approach for making of query. Configure a button (Name it as 'Search') and upon clicking this button perform the query analytics call with the filters as selected by user. This way we can restrict the costlier queries.
    3. isnull has been used extensively. I would like to suggest to use rule!APN_isBlank (or an equivalent implementation) because isnull might evaluate to true even if a variable holds blank value in SAIL.
    4. You might think of extending the rule and can make it much generic so that it can be reused much effectively. But please bear in mind that writing a rule as much as generic results in degradation of performance.
  • Hello Sikivahans,

    Attached are the two rules, In all task report rule, You have passed only two parameters in If function, I have added the third parameter as {} in that rule, Let me know if it is correct.

    Also,
    In main rule, I have added the submit button, but the report throws below error:
    Expression evaluation error in rule 'util_getalltaskreport' at function a!dashboardLayout [line 46]:
    When I debugged the same, I observed that when I remove the sectionlayout of grid field then it is working fine, and when i add it back, then it throws an error as above, this seems to be strange, Not sure why dashboard layout is throwing an error on 2nd section layout.


    All task Report.txt

    main rule.txt

  • @vinitl Apologies, if() was improperly written, as it was late in the night. Attached the definition again, could you please debug the interface again and let me know if there are any issues?

    Query process analytics for any number of records.txt

  • Hello Sikhivahans,

    Attached isthe main rule, It is returning only 10000 records in the grid, I am not able to see the complete list. Can you let me know what we are missing.

    Regards,
    Vinit.

    main rule.txt

  • There has been a problem in your code in the definition of local!columnConfigs (Line #25). I have corrected the same and uploaded the rule again. Please debug the interface again.

    main rule.txt

  • I think u attached the old version of main rule, Can you upload the document again.