XPath Constraints in MDL

Guide XPath constraint syntax for Mendix MDL scripts.

1|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/engalar/mxcli-taskdemo --skill xpath-constraints-in-mdl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: XPath Constraints in MDL
Source: https://github.com/engalar/mxcli-taskdemo/tree/main/TaskDemo/.claude/skills/xpath-constraints
Command: npx skills add https://github.com/engalar/mxcli-taskdemo --skill xpath-constraints-in-mdl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves the complexity of writing correct XPath constraints for Mendix MDL, ensuring accurate data retrieval, security rule definition, and page data source filtering.

Core Features & Use Cases

  • Syntax Reference: Provides clear guidance on XPath vs. Mendix expression differences, including boolean logic and path traversal.
  • System Variable Guide: Detailed documentation on using tokens like [%CurrentUser%] and time-based variables within constraints.
  • Use Case: When building a microflow that retrieves specific orders, use this skill to correctly format the XPath constraint to filter by status, owner, and date ranges without syntax errors.

Quick Start

Use the XPath Constraints in MDL skill to generate a valid retrieve statement that filters orders by a specific status and the current user.

Frequently Asked Questions about XPath Constraints in MDL

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write XPath constraints in Mendix MDL to filter database queries?

XPath constraints in Mendix MDL filter database queries by using specific syntax for boolean logic, association traversal, and system tokens like [%CurrentUser%] to ensure accurate data retrieval and adherence to Mendix runtime requirements.

What is the difference between standard XPath and Mendix MDL expression syntax?

Mendix MDL XPath differs from standard Mendix expressions in its boolean logic and path traversal rules. The skill provides syntax reference to clarify these differences and prevent errors when constructing database query constraints.

Can I use system variables like [%CurrentUser%] inside Mendix XPath constraints?

Yes, you can use system variables like [%CurrentUser%] and time-based tokens inside Mendix XPath constraints. The skill details their integration to filter entity data dynamically based on the current user or specific date ranges.

How do I apply XPath constraints for security access rules in Mendix?

XPath constraints define security access rules in Mendix by filtering entity data to restrict visibility. The skill guides you through correct operator usage and association traversal to enforce runtime security without syntax errors.

What are the BSON serialization rules for Mendix MDL XPath constraints?

Mendix MDL XPath constraints must adhere to BSON serialization rules to ensure the runtime processes database queries correctly. The skill clarifies these requirements to prevent data retrieval failures and maintain query accuracy.

Why is my Mendix microflow retrieve action failing with an XPath syntax error?

Mendix microflow retrieve actions fail with XPath syntax errors due to incorrect operator usage or invalid association traversal. The skill provides best practices to format constraints correctly for filtering by status, owner, or date ranges.