Accessing a users language setting via xpath

2
Can I access a user’s language via xpath? (I want to filter a data grid which has different languages to the language of the user. Since I am required to use the rich text suite in order to display hypertext, I am including an association to the System.Language entity from my TextArea entity.) I tried to cheat by creating an association from the TextArea entity I’m trying to filter on to the User entity which allows me to constrain w/the following xpath: [AdminText.TextArea_User/LER.User/System.User_Language/System.Language/Code = AdminText.TextArea_Language/System.Language/Code] but this did not work. (I also tried the System.Language/Description attribute but no luck either.)
asked
1 answers
5

Hi Justine,

Some remarks

  1. To me it makes no sense to connect a user to a text area. What would that association mean? You can retrieve the current user simple by using '[%CurrentUser%]'
  2. Xpath cannot compare two associations, rather, you should walk the associations until you reach the object you are looking for. Which is effectively the same.
  3. So, in the end, your xpath should be something like:

[AdminText.TextArea_Language/System.Language/System.User_Language = '[%CurrentUser%]']

(or in other words: take the textarea that has a language that is the language of the current user). Thats all I guess.

answered