Forum Discussion

srivallivalluri's avatar
srivallivalluri
Qrew Trainee
8 years ago

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

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
  • 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
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      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.