Skip to main content
February 21, 2024
Question

a!queryrecordtype

  • February 21, 2024
  • 10 replies
  • 0 views

Hi All,

I am using a!queryrecordtype() function to retrieve data from records but every time it also calculates the fetchtotalcount parameter even if I gave it as false.

Can anyone please help me out how to remove the totalcount calculation.

    10 replies

    stefanhelzle0001
    Brainy
    February 21, 2024

    From the docs:

    This parameter is only used when querying unsynced record types that use a database as the source. Synced record types automatically return the totalCount property. If set to true, a separate query returns the total number of records in the totalCount property of the query result. In cases where you don't need the totalCount, omitting this parameter can improve performance.

    niranjanreddym9323
    February 21, 2024

    Using the fetchTotalCount parameter

    For record types with data sync enabled, fetchTotalCount is applied because Appian already knows the total number of records and therefore doesn't need to query the source to provide this information.

    For record types without data sync enabled, there is a performance cost to getting the total number of records with a query. If you decide you want to retrieve the total count, set fetchTotalCount to true. 

    February 21, 2024

    Hi niranjanreddym9323, data sync is not enabled, and fetchtotalcount is false, yet it gives the total count in output.

    stefanhelzle0001
    Brainy
    February 21, 2024

    Which Appian version are you working with?

    mathieud0001
    Brainy
    February 21, 2024

    Why did you want to remove it? You want to improve the performance of your query?

    February 21, 2024

    Yes mathieud0001, need to remove the fetchTotalCount to improve query performance.

    mathieud0001
    Brainy
    February 21, 2024

    And this Record is entiity backed?