Retrive an entities by user

I need to show in a data view  information about an entitie called “Survey”, that needs 3 filters: -current user -end date (don`t show element if the endDate already pass) -already answere    this is the domain model:   this is the microflow were i’m working on to get this survey entitie with the 3 filter mentioned before   Here is were i want to do the current user filter (to only show the element associated to the current user): Need help with the Xpath for current user please 
3 answers

Hi Constanza,

I might be missing something but there seems to be no association between ‘Survey’ and ‘Account’. This makes impossible to retrieve surveys from 1 user, since you don't know what surveys belong to which user.

You will need to associate the survey with the account earlier on. In the retrieve microflow you can then check if $Survey/Survey_Account = ‘[%CurrentUser%]’.

Hope this helps!


Hi Constanza,


perhaps your Survey Entity has a “System/Owner” attribute?

If so you can filter directly in your XPath, something like:

[System.owner='[%CurrentUser%]' and Completed and (EndDate > '[%BeginOfCurrentDay%]')]

This will show only Surveys created by the current user.





You can enable the Store owner option in your Survey Entity. 


For Current User :

You can double-click the entity and Check the Store Owner Check box under the System members heading.

Then in your Retrieve Paste the Following :



2: end date:
You can make use of Mendix Default Xpath Tokens:

for Example :



3: already answere :

I did not follow the Association here, but based on your Domain  model i could find a boolean value in Survey entity Completed .

You could use that, given you are changing the value in your flows, when all the questions are answered .


At the end your Xpath mind end up some thing like below :






Hope this helps !!