Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82389

Retrieving only records created by user

$
0
0

In an application an entity has the attribute CREATOR. Now we want to only display the records created by the logged in user (= CREATOR)

The XPath constraint would be : [CREATOR = $currentUser/Name]

This constraint works in a Retrieve activity.

Thise constraint cannot be used on a dataview/datagrid widget (Data Source type XPath) and as an XPath constraint in the Access rules within the entity on the assigned role. In those cases the check value (second part) has to be in quotes, making it a literal.

When the Data Source type Database is used, we can also add a constraint, which seems to look correct, but transformed to an XPath constraint the second part is quoted again.

How can we retrieve the preferred data records using this constraint? Where in the programme logic do we have to add this constraint to get the wanted result?


Viewing all articles
Browse latest Browse all 82389

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>