Hi Cristhian,
Could you kindly provide an example of the domain model that you have? that way we can replicate your scenario and help you properly.
Best regards!
Hi, Oswaldo, yes, of course:
This is my dom,ain model:
Core is my main entity and Cliente is another entity both are related:
I have a gata grid that shows records in core:
I’ve created a user called Frutadeli, so, when Frutadeli logs in it must only see Frutadeli’s information in the data grid.
How can I solve this?
Hi and OK, so if I understood correctly, this is something similar to what you currently have:
In that case, I would suggest that you use a microflow to retrieve the current user information (where Client attribute is assigned to your user entity) outside of the Data Grid:
And then set the data source of the data grid to an XPath similar like this:
That way you can compare the current user’s Client with the Core’s Client (record’s Client).
I hope that solves your question, best regards!
Hi and OK, so if I understood correctly, this is something similar to what you currently have:
In that case, I would suggest that you use a microflow to retrieve the current user information (where Client attribute is assigned to the user) outside of the Data Grid:
And then set the data source of the data grid to an XPath similar like this:
That way you can compare the current user’s Client with the Core’s Client (record’s Client).
I hope that solves your question, best regards!
Oswaldo, you only forgot to show me the microflow
Hi Cristhian, here’s what the microflow looks like:
In my scenario I have this entity for the User, where the generalization is the Administration.Account, this is where I have the Client attribute for the user. In your case in may be different:
I hope that helps!
I’m not using Users entity, i’m using this:
You can use the XPath parameter '[%CurrentUser%]' to access the current user. Example:
[Module.Core_Client/Module.Client/Module.Client_User = '[%CurrentUser%]']
If “Client” has an Association with the Entity “User” from MX.
This way you won’t need a dataview to retrieve the currentUser logged in your system.
The entity Account uses the generalization of the Entity User, so you can use the following XPath instead.
[Module.Core_Client/Module.Client/Module.Client_Account = '[%CurrentUser%]']
I have this other domain model, here I’m handling the users:
You can use this XPath:
[“CoreModule”.Core_Cliente/”CoreModule”.Cliente/”AccountModule”.Cuenta_Cliente/”AccountModule”.Cuenta = '[%CurrentUser%]']
Replace “CoreModule” and “AccountModule” with the respective names
Ok, you’re using the entity “Cuenta” with the generalization of the entity “Admin.Account” which uses the generalization of the entity “System.User”
So you can use something like this:
[CoreModule.Core_Client/CoreModule.Client/AccountModule.Cuenta_Cliente= '[%CurrentUser%]']
Ok, you’re using the entity “Cuenta” with the generalization of the entity “Admin.Account” which uses the generalization of the entity “System.User”
So you can use something like this:
[CoreModule.Core_Client/CoreModule.Client/AccountModule.Cuenta_Cliente= '[%CurrentUser%]']
Raique, is not working :
is not working:
[Trust_SEC.Core_Cliente/Trust_SEC.Cliente/TrustApp_Cuenta.Cuenta_Cliente = '[%CurrentUser%]']
This might work
Raique, look, this is the escenario:
This is the first domain model in Trust_SEC module:
then, I have another domain model in Trust_APP module:
In this domain model I have the following associations:
How does the path look like?
And, I’m having this error:
Hello
To show records in a data grid based on the client associated with each record:
Check https://forum.mendix.com/p/community/Mulesoft Course
Ensure robust security measures to prevent unauthorized access to other clients' data.
Thank you.