Daniela Field
Senior Solutions Consultant

Daniela has over 7 years of experience as a technology professional. She is a Senior Solutions Consultant and has built multiple customer apps in various verticals. Daniela firmly believes that the use of Agile methodologies is the future in application development and enjoys the flexibility and speed with which applications can be developed and deployed using the Mendix Platform.






XPath is one of the main query languages designed to retrieve data. XPath uses path expressions to select data from Mendix objects and their attributes or associations. It is a critical component and important to know and understand how to effectively query data.

During this webinar you will learn the following:

  • What XPath is and how it is covered
  • How to add XPath expressions to pages and microflows
  • How to apply XPath to entities for security 
  • Advanced and best practices on XPath constraints

Questions & Answers

Can we see the resulting SQL of an XPayh query to optimize its performance?

Yes. To see the resulting SQL query, you can set the log levels for ConnectionBus_Retrieve log node to Trace. Once you do that, you will see all the underlying queries in the Modeler Console. You can learn more about logging on the Log Levels page.

Is there any performance difference between having multiple groupings [...][...] or combining them into one with [(...) and (...)]. If they are separate, does the order matter?

There is no performance difference between the two queries. However, order does matter, and it is best to add the most restrictive condition first, followed by second restrictive, and so on.

From where we can download the video of this webinar?

You can view this webinar and any previous webinars at: https://developers.mendix.com/training/webinars/.

How long can an XPath query be?

There is no limit on the query length, and your query formation and options is dependent on your domain model setup.

If you are showing an attribute by association, is that a query on its own? Is there a performance impact?

Yes, using a reference selector in a page is a query on its own retrieve function. Depending on the page setup, it can have a performance impact.

Can you compare associations to empty in a data grid?

Associations cannot be compared to empty. However, you can use the NOT function to get the same result. For example, you are in a page showing Entity A, and want to get ones where the relationship between Entity A and B is empty, you could use the following XPath query: [not(EntityA_EntityB/EntityB)]. Be mindful that NOT queries can negatively impact performance if not used properly.

Can we use XPath in reports also?

Yes, you can add XPath queries in reporting widgets such as Simple Charts.

View past Expert Webinars on-demand at developers.mendix.com.