API_DOQUERY to show 10 records on page scroll or pagination show remaining ,is there any special api or attribute to use with this api

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
  • (Edited)
hi, i have to load only 10 records at one time in my mobile application by using API_DOQUERY,remaining should load in pagination , can you help me out with it
Photo of srivalli valluripalli

Posted 1 year ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,482 Points 20k badge 2x thumb
You use the parameter options with num-n and skp-n values to indicate the number or records you want (num-n) and how many to skp (skp-n) based on the current sort order.
To grab 10 records as a time you would use URLs similar to these
?act=API_DoQuery&qid=1&options=num-10.skp-0
?act=API_DoQuery&qid=1&options=num-10.skp-10
?act=API_DoQuery&qid=1&options=num-10.skp-20
(Edited)
Thank you
(Edited)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,482 Points 20k badge 2x thumb
That features is called "infinite scroll" and you can find libraries for that using google. Bear in mind that API_DoQuery would just fetch the next bucket of records on the appropriate scroll event. You still have to render the XML data to HTML and append it to the current display. That would be highly dependent on your architecture and technology you are using.
yeah, thank you understood,will go with it
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
ok sure ,than you
(Edited)