How to change list.current in a client side aggregate; without refresh?
Application Type
Platform Version
11.8.2 (Build 15644)

We have a screen which shows the details of a single record (current) and need users to browse through a list of records really fast on a slow device.

Retrieving the item from the local storage on each click (refresh aggregate) does not perform well enough.

For that reason we want to load the full aggregate on the page and let the user browse by changing the list.current property of the aggregate.

We can simply assign it a different record; though that does not work completely, it seems to mess something up when you get to the end of the list.

Does anybody know how we can change that property properly? (outsystems js api or maybe another smart approach?)

Rank: #95

Hi Frank,

You can use List[Position].Recod.attribute.

Where Position is 0-based. For example GetUsers.List[0].User.Name.

Hope it helps.



Rank: #1764

True; but we'd rather not have to do this everywhere in the page logic for maintainability. But we'd need to do that indeed if we cannot set the current value. 

Now if we assign another record to current, it literally overwrites the record that 'current' is referring to. I also don't want to dive too deep into the OutSystems libraries since they might change over time.

There is a setcurrent list function in datatypes.js but that requires to dive into the core of OutSystems too much for my taste.. :-)

If you want to have the screen show the details really fast you may have the list item content have it all but only the fields from your current list are visible and when the user clicks on the line the fields from the detail are shown. 

 It can be done using the list inside an accordion and an accordion item in the ListItem.

Hope this helps