1. Michael Hartnett
  2. PowerServer Mobile (Obsolete)
  3. Friday, 30 November 2018 16:02 PM UTC

Hi All,

I am trying to implement a lazy loading type retrieval of data on Appeon Mobile.  I am using the ROW OFFSET option on my SQL Select which works great, but I have to then tap a button to do the next retrieve.  This button is visible at the end of the DW on the mobile device each time I scroll to the bottom (as long as there are more records to display).

I would like to change this to load the next set of data as soon as the last row on the DW is visible after scrolling, but the ScrollVertical event is unsupported on Appeon Mobile!

The following code works great on Desktop:

long ll_numrows
string ls_firstrow, ls_lastrow
ll_numrows = This.RowCount()

ls_lastrow = This.Object.Datawindow.LastRowOnPage
st_1.text = ls_lastrow

if ll_numrows = long(ls_lastrow) then
of_get_data()
of_set_total()
end if

 

Has anyone else tried to implement this on Appeon Mobile, or any advice on how it might be done?

Thanks

Michael

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Monday, 3 December 2018 10:58 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # Permalink

Hi Michael,

I wouldn't call it lazy loading but simply "retrieve as needed" :-)

Anyhow, you can work around with a timer (e.g. half second) that triggers a "ue_scrollvertical" user event, where you have your code.

Best,

.m

Comment
  1. Michael Hartnett
  2. Monday, 3 December 2018 15:35 PM UTC
Thanks Marco,



That works like a charm. Added a timing object and call my UO function from the Timer event. Now when the DW reaches the last row, it does the next retrieve of offset rows with a minor pause.



Exactly what I wanted.



Attended some of your talks at Elevate in Philadelphia, excellent as usual.



Michael
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.