need help with fetching the data using the entity

Certified Senior Developer

Hi team i am unable to fetching the data using the query entity,
due to some restrictions i have to use the CDT only so i am using query entity for fetching  the data,
(I want this data for displaying into the read-only grid)
i have 2 tables in DB


1st table having the 42 columns and 26191 rows of data so i am using the below code for fetching the hole data 

a!queryEntity(
entity: cons!1stentity,
query: a!query(
pagingInfo: a!defaultValue(
value: ri!pagingInfo(Type:pagingInfo),
default: a!pagingInfo(startIndex: 1, batchSize: 10)
),


),
fetchTotalCount: true(),

),


but using this code i can able to fetch 21568 rows of data only not able to fetch the whole data,


2nd table having the 8 columns and 389434 rows of data so i am using the below code for fetching the whole data.

a!queryEntity(
entity: cons!2ndentity,
query: a!query(
pagingInfo: a!defaultValue(
value: ri!pagingInfo,
default: a!pagingInfo(startIndex: 1, batchSize: 10)
),


),
fetchTotalCount: true(),

),
From this table i can able to fetch the 389434 
rows of data, i mean i can able to fetch whole data,

anyone help me with this how can i achieve to fetch the whole data from 1st table without losing 

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Associate Developer
    in reply to ram

    The best way is to use record for sure. 

    But I guess you could do this with queries and a read only grid field with custom pagination. 

    You will need a query to fetch the total count, and with another query and custom pagination buttons, you could load the next/previous batch of data that you want to present in the grid at that time. So you won't query the entire table but only the particular batch of data. 

    I don't recommend this way as it requires a lot of effort to implement it and its tricky as the CDT should be mapped to a table with auto increament ID values enabled so you could count what the startIndex of the pagination will be each time. If the table changes drastically (i.g a view), then its an issue.

  • 0
    Certified Lead Developer
    in reply to ram
    to display whole data into Read_Only Grid

    As I mentioned earlier, if you attempt to show tens of thousands of rows of data on a read-only grid, the form will barely load, and even if it did, the user experience would be miserable.  The MOST i'd ever consider all at once is maybe a hundred, and that's only if it's critically required (and on the simple side).

    Why can't you just use paging?