452
Views
12
Comments
Mobile go to element on list
Question

Hello,


I have a list with 50 items and when scroll down and click for example on element 35 I go to the details screen of that record, then go through several screens and when I finish I would like to go back to the list in the element I started (35). However, the list doesn't load all the items and element on position 35 is not on the DOM.

How can I load all elements of the list to be able to use an anchor?

or

How do I go directly to this element, since the list only loads 7 or 8 elements as you initially load the scree, and as you scroll it loads additional records.


This is a Mobile Application version 10.


Thank you

Staff
Rank: #18

Hi Tiago,

Considering the process the user goes through after clicking on an item, how complicated would that be to implement in one single screen? It might not be your case but usually, when you have a main screen which is a list and the detail screen of each item is a process that ends on the list screen, we use Silk UI Mobile master detail or split screen patterns to help us. That way you wont lose the state of the list and the performance will also improve a lot.
If your scenario is more complicated than that there a couple of tricks you can do but i would advise on a UX review.

Regards

mvp_badge
MVP
Rank: #6

Hi Francisco,


I would like to know the tricks.
just for the sake of knowledge :)


Cheers,

Eduardo

Staff
Rank: #18

I'm going to highlight again that this is not the best practice, but as requested I'll share some insights on a possible solution for problems related with this pattern.

If you have an ordered list, and it keeps the same order after the process, you can add an input to the screen to inform the aggregate of the record row index you want to target. To avoid performance issues you need to pre-index your records and filter it by a range, for example from Record.Index < TargetIndex+10 && Record.Index > TargetIndex-10. That will bring you issues with the scroll behavior and you'll need extra logic to take care of that feature. Not to talk about searches... so, again, i advise everyone not to follow this kind of cheap tricks. 

This kind of advanced solutions are possible, but they need to be analyzed for each individual use case, there is not a generic list solution - At least apart from what the platform already does for us, which is already pretty good and most of the times enough!


Regards

mvp_badge
MVP
Rank: #6

Thanks for the information, Francisco.
I don't plan to do this (and understand the problematic), but I was really curious about it :)
Thanks again.

Cheers,

Eduardo

Rank: #30860

Is there a way to just load the entire list?

Staff
Rank: #18

Hi Cipriano,

MaxRecords 0 fetches all the data but it is a bad practice to fetch all data. Try to always fetch contextual data for the problem you want to solve. Give the user a few records and only load more ondemand.

Regards

Rank: #30860

Hi,


Thanks for your quick reply.


What I mean is, fetch all the data and list it all on the screen. Like, I have a table with 100 records, I want to gett the 100 records and display them on a list without the dynamic data load thing we see when we scroll the list.


I understand its not good for performance and all that, but can it be done?


Thanks,

Cipriano

Rank: #615

Hi Cipriano, 

you can disable the list virtualization (set disable-virtualization=true on list extended properties). This will load all elements of the list.

Staff
Rank: #18

Hi guys,

Please do not disable virtualization on lists. If there is any issue with it please report.
The teams are currently working in improving that feature and you wont take advantage of it if you disable it now. Also, that is a last resource feature, it is not meant to be used.

Ping me if you need help in solving any issue regarding this thread.

Best Regards

Rank: #232

Tiago Alves wrote:

Hello,


I have a list with 50 items and when scroll down and click for example on element 35 I go to the details screen of that record, then go through several screens and when I finish I would like to go back to the list in the element I started (35). However, the list doesn't load all the items and element on position 35 is not on the DOM.

How can I load all elements of the list to be able to use an anchor?

or

How do I go directly to this element, since the list only loads 7 or 8 elements as you initially load the scree, and as you scroll it loads additional records.


This is a Mobile Application version 10.


Thank you

Have you ever tried Split screen widget? if no then please try that, it will fix your issue.


Thanks,

Keerthi


Rank: #7807

´I´'m having a problem quite similar but with a bit diference.

I have a list of blocks. That list goes much longer than the sreen. The agregate source of the list and then the blocks is ordered by date so the list of blocks is ordered by date.

How can I in an action (go to / scroll) to the first block with a specific date in that list of blocks?

Best regards

Pedro Guerra