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

1
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:) I have my data grid entity inherited with Account where the desired variable is located (email) but it doesn't work that way (although it should since at constants it returns the values of the current user). I tried to make a microflow where I temporarily save the current user's email and then pass it on to that xpath and it doesn't work either. Am I doing something wrong or is it a bug from mendix?
asked
1 answers
2

Hi Cojocareanu Cosmin-Florentin

I guess you need a helper non-persistable entity with the search attribute let's say email in the page set the main object of the page this entity inside it put your data grid with a MF data source inside the data view in that case you a param of type Helper will be in the DS MF make a decision to see if the $helper/email is empty to retrieve all records of if it has any emails to retrieve the record that you are looking for.

I hope I simplified the scenario 

Please recommend this as an accepted answer if it answers your question

Thanks

answered