How to get current record in list navigation on click

How to get current record in list navigation on click

  

Hi,

How to get current record in list navigation on click





Hi Sekar,

By list navigation do you mean the widget for pagination on a table/list record? 

Or are you referring to a line on a list/table record on your screen? If this is the case when you have a link /button /onclick on the line, when you access the list on the action you will have the line you clicked as the current row of the list.

Hope it helps.

Ana Reis

Hi Ana,

Thanks for the reply, I am using List. 

I have a session variable, and i want to update the session value when i click next or previous in list navigation.

i tried updating the session value in list navigation "Destination" Action, Its not getting reflected correctly. 

Could you help me how to do that?


Ana Reis wrote:

Hi Sekar,

By list navigation do you mean the widget for pagination on a table/list record? 

Or are you referring to a line on a list/table record on your screen? If this is the case when you have a link /button /onclick on the line, when you access the list on the action you will have the line you clicked as the current row of the list.

Hope it helps.

Ana Reis



Solution

Hi Ana,

I have fixed it by adding a expression in page like below. Set the class to "Hidden". Its working fine.

SyntaxEditor Code Snippet.

Session.Id = MyList.List.Current.Table.Id

Is there any other best way to do that?

Solution

Hi Sekar,

That works to store the Id of your Table entity in Session, but I'd advise against naming a Session Variable just "Id", give it a more meaningful name like "SelectedTableId" for instance.

And secondly can you explain a little bit better what are you trying to achieve with this? Depending on your goal there might be better alternatives (or not).