If I have 12,000 rows in a Lookup Table, is there a way to create a Lookup Table Query that pulls the first 4,000 rows or rows 4,001 to 8,000?
Question
Question
Possible to create a lookup table query that pulls specific number of rows?
Replies
There is a row limit field on the query editor itself. You could also use the _key property if your table is already ordered. If its not you would need a column for numeric indexes for each order by you want to query off of and use that as a limit.
Or as suggested, use the API
Not in a lookup table query I don't think. Can you use the OData api?
Max retrieval is 1000 records on the API. Here's what retrieving 4001 to 8000 looks like in 4 separate calls.
GET https://api.laserfiche.com/odata4/table/MyTable?$top=1000&$skip=4000&$orderby=_key asc
GET https://api.laserfiche.com/odata4/table/MyTable?$top=1000&$skip=5000&$orderby=_key asc
GET https://api.laserfiche.com/odata4/table/MyTable?$top=1000&$skip=6000&$orderby=_key asc
GET https://api.laserfiche.com/odata4/table/MyTable?$top=1000&$skip=7000&$orderby=_key asc
Laserfiche OData table API query maximum page size is 1000. Generally speaking, to get a large result set one page at the time:
- Use "@odata.nextLink" the get the next page. This property is undefined when the last page is returned.
- Remember to specify a deterministic "$orderby" to prevent duplicates or missing records.
FYI: Example OData V4 Web Request Rules (Laserfiche Cloud)