access the column of a specific table records row

I have a table records trU where that has as Source Record a query with multiple entities. In the table records Im showing info like this"trP.List.Current.Users.NR". 

In a column I have a popup and I want to pass to this popup the id of the current user where the user clicks in that modal. But Im not understanding how to do that. I can access the current number like this trU.List.CurrentRowNumber, but how to access the id of the user of the current row where the user clicked in the popup link? Like "trU.List.CurrentRowNumber.User.Id".

Did you try "trU.List.Current.User.Id"?

or

"trU.List.Current.User.UserId"?


Well depends on where the UserId is on your Users entity or record in that record list.

Juan Carlos Elorde wrote:

Did you try "trU.List.Current.User.Id"?

Thanks but like that the Id is always the same if the user clicks in any link in any row of the table records. 


Can you share the oml? Usually, the 'current' pertains to the record the end user click on the table records.

Hello Oscar,


Usually, referring to the Current element of the record/aggregate should be enough to get your desired information, and from experience there are two instances where you don't get them.


One is if you accessed the identifier from its Source when there exist a child, i.e. Current.User.Id instead of Current.Employee.UserId.

Solution: Access the identifier through its child always, i.e. Current.Employee.UserId


Another is when the Current value does not persist throughout the process flow, i.e. Current is available on the immediate screen action triggered by the recent event, then changes to either to null/default values or the last item of a list.

Solution: Create a local variable which will store a copy of the Current on the immediate screen action, and use that variable instead on the next subsequent actions.


Please do note that sometimes these scenarios doesn't happen, and I was not able to fully determine when and why.


Hope this helps!

- Emman

Hi,

Please check the OML file. I hope it will help you to do it. If you send me the OML I can able to fix the problem. Waiting for your response,

Thank you,

Sudip

Hi Sudip Dey,

What I am checking in the OML given popup is working fine. Its updating the current student.

Hi Lovely Priyadarshini,

Please read the text properly then post any comments. I have given the solution not the problem statement.

I hope you will take care of it next time,

Thank you,

Sudip

HI OsCaR_,

Please check the OML I sent. I hope it will help you.

Waiting for your response.

Thank you,

Sudip

Hi OsCaR_, 

Let me start by asking you if your link and popup editor are located un the Header of the tabke or in the data Line? 

For this to work, the link+popup must be placed in the data line. 

Then, if your popuo page needs an input parameter and you set the value of this property, in the link, as trU.List.Current.User.Id. Notice the use of the list CURRENT instead the CurrentRowNumber? 

What will happen is that when the page is being built, the current of the list will change for the item that is being placed in screen, every time a new line will be built. So, using the current you are effectively building the link with the correct id

If instead of a popup you are opening a modal, justvset an input parameter in the action (UserId) and on the link calling the action pass the user id as showed before. 

Hope this helps clarify things. 

Cheers 


Sudip Dey wrote:

Hi Lovely Priyadarshini,

Please read the text properly then post any comments. I have given the solution not the problem statement.

I hope you will take care of it next time,

Thank you,

Sudip

I am really sorry Sudip Dey I have confused with name who had posted it. I will keep this in mind from next time.