cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 2.0: How to maintain the list selection in back stepping

Former Member
0 Kudos

Hi Personas 2.0 experts,

I have an issue - there is a list on "Home screen", eg, a list contains items of "A", "B", "C". If item "B" is selected and used in a tcode, and it goes to another screen. Then user goes back to the "Homescreen". Now the issue is - I want the item "B" is selected in the list. Currently it displays the default item which is "A".

Does anyone know how to keep the selected item when navigating back?

Thanks!

Dong

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dong,

What transaction is this 'home screen' and how does this list look like? Is it a table in a standard transaction?

In general, the way I would approach such a problem is this: When a selection is made and the user navigates to another transaction via a script button, I would store the selected record's ID in a hidden field in the same script. Then, there would be another hidden script button, attached to the home screen's OnCreateHandler that would read the selected ID from the hidden field and perform the selection, setting it to item "B"..

Sounds like you tried to do something like this, so the exact solution will depend on what kind of list is on the screen. No idea what would cause the slow performance. If it is a large table, then using slim state in SP3 should help with that.

Former Member
0 Kudos

Hi Tamas,

I am using a dropdown box list made by me. The proble is that the index stored in the hidden field has to be passed between screens. I did like args.myIndex. However, such info is lost if I do not do everthing in one script button.

While, I just found another stable way to store the globle var, by window.myIndex. Thus myIndex is really gloable now which can maintain the value set anywhere during the UI flow.

So teh solution is:

in JS code, args.myTmpIndex=window.myGlobalIndex;

Br,

Dong

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Extra info - since the list selection can be done by "Enter value" with a fixed value, I tried a script btn which checks a value from a textbox, then depend on the value checked, it "Enter the value". The probelm is that when the list contains more items, say, 10 items, the UI preforms very slow. So I was wondering if there will be another better way of keeping the item selection.

Br,


Dong