Mendix 7 is no longer supported unless you have Extended Support (for details, please contact Mendix Support). Mendix 7 documentation will remain available for customers with Extended Support until July, 2024.
XPath id
1 Overview
This function replaces the default XPath query syntax. It retrieves data based upon the unique identification number supplied. Each individual Mendix object generated in a project is automatically provided with an ID.
The argument of this function can be the following:
- A string containing one ID
- A string containing a space-separated sequence of IDs
2 Examples
This query returns a list with one object (which has the ID “123423462342”):
|
|
This query returns a list with three objects (these objects have the IDs “123423462342,” “123423462343,” and “123423462344”):
|
|
'//'
. ID queries always start directly with id(....
.
This function is often used to constrain retrieving objects to the objects of the current user only:
[id = $currentUser]
It will only return results when you are querying System.Account
or specializations of that entity. Entities with a one-to-one relation to the account will give no results.
If you want to get all the objects (querying any entity) that were created by the current user, you should use the following function:
[System.owner='[%CurrentUser%]']