XPath Constraint on System.User_Language

0
Hi, I am trying to add an XPath constraint to a microflow to filter the datasource based on a matching user language. I noticed that: the "App Store modules/Administration/User Management/Admin/Account_Edit/Language/referenceSelector1" uses  System.User_Language/System.Language/System.Language.Description   but I can't: create an association from an entity in my module to the "System.User_Language/System.Language" entity create an entity in my module which inherits from "System.User_Language/System.Language" entity use "[$currentUser/System.User_Language/System.Language/System.Language.Description = ..." in my XPath; as a matter of fact, I can traverse beyond "[$currentUser/System.User_Language"   How do I filter on the User's language? Any tips are well appreciated, Guislain
asked
2 answers
3

I am assuming you have an entity with a reference to language containing the translated values. To retrieve the object with the same language as the current user you can use the folllowing XPath:

[MyModulename.SomeEntity_Language/System.Language/System.User_Language = '[%CurrentUser%]']

See also this forum post about mulitlingual design models: https://forum.mendix.com/link/questions/5419

Regards,

Ronald

 

 

answered
0

Thank you Ronald, for the suggestion.

Does the proposed solution [MyModulename.SomeEntity_Language/System.Language... imply being able to create an association between 2 domain models (MyModule & System),  specifically the MyModuleName.SomeEntity table and the System.Language table?

How do I do that since I cannot drag a System entity in MyModule to reference it?

Thanks for the clarification,

Guislain

answered