You are viewing limited content. For full access, please sign in.

Question

Question

Possible to create a lookup table query that pulls specific number of rows?

asked on April 7 • Show version history

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?

1 0

Replies

replied on April 9

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

1 0
replied on April 14

Hi Zac. I was looking in the help files for Cloud and don't see anything that references the _key property. Can you give some details on it?

0 0
replied on April 8

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

0 0
replied on April 8 • Show version history

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)

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.