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

0
Hello experts:) How can I access the current user's email in xpath so I can filter this data grid dynamically? I have an entity called employee in this data grid and I should filter the data according 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 for example(data view object not available in xPath unfortunately)but if I use Microflow as a source I no longer have the possibility to have a search bar and it is mandatory to have that search bar(so the microflow variant is excluded) I tried to retrieve the current email from the Account entity (being that in this entity is theoretically the user's email and I have the inheritance made with the data grid entity)but it doesn't return anything if I do so (although I find it strange since xpath constraint on Account entity returns only the current user's data) I tried to put the page where the data grid is in a microflow where I save the current user's email in a variable before entering the page and I pass that variable after in xpath but even that does not work. Do you have any idea how I can access the current user's email? Thank you?
asked
1 answers
1

Hello Cojocareanu, 

 

First thing that I notice from your text is that the employee can only see its own account this is probably related to the security settings in your domain model on the entity and on the security setting in your app settings. So do a small check if everything is set appropriate to your project needs.

 

Then for your datagrid maybe you can switch to a datagrid2 you can then pass a parameter to your page with the users account and this parameter should be available then in your datagrid  and you can set your xpath based on this. 

 

Hope this helps

answered