How can I access the current users email in xpath on data grid?

Hello experts:) How can I access the current user's email in xpath so I can filter this data grid dynamically? I want that EmailAddress to be equal to the current user's email. It would have been simple if the data source came from a microflow  or if I could have accessed the variable with the desired email from a data view but I need to have the search button active and therefore I have to use this method with xPath:)
1 answers


You can't get the Email directly from currentUser system variable, so you have to retrieve the current Account and use the Email from Account object.



Work Around :

During Account creation if you set the Email to Name attribute of System.User object, then you can fetch the Email from $currentUser/Name.




Hope it helps!