Using exports.runVirtualWithPaging

Comments

4 comments

  • Bhavik Shah Senior Product Manager
    Answer Pro
    Great Answer

    bill budwitz

    I don't see any issue with your code. Perhaps this appears to be a data issue. Are you sure there are enough records to be fetched for 2nd page ? 

    0
  • bill budwitz
    Celigo University Level 1: Skilled
    Engaged

    Bhavik Shah there are over 600 records at that endpoint (Postman and a celigo import flow returns this many).   There is another issue that Celigo is "working" on that will return the number of records (pageSize) return on an exports.run call.  currently it defaults to 25 max and no matter what pageSize is set too it still just returns 25 records.  Maybe related, i dont know.  very frustrating.  

    0
  • Scott Henderson CTO
    Celigo University Level 1: Skilled
    Answer Pro
    Top Contributor

    Hey Bill,

    Where is your script running?  Is it in a 'MyAPI', or is it running in a 'hook' in a flow?  I am asking because if you are doing this in a MyAPI, and this is the only thing the MyAPI function needs to do, then we also have a standard REST API that you could call that would allow you to do the exact same use case, but without having to write any JavaScript.  See here, and look for the following sections.

    We will work on the Celigo side to fix any bugs asap, but hopefully we can also find you a work around in the meantime.

    0
  • Bhavik Shah Senior Product Manager
    Answer Pro
    Great Answer

    bill budwitz We got this checked with our internal team. It appears that paging method properties are not part of the export object which is why system is returning default values. Could you please add paging properties related parameters in export object and check if that works ? 

    Eg : pagingMethod: 'nextpageurl', nextPagePath: 'nextPageURL'

    Meanwhile we will update help docs to ensure these nuances are captured. 

    0

Please sign in to leave a comment.