Expert Utils
Overview
Expert Utils – Advanced Java Actions for Power Users
Supercharge your Mendix applications with a collection of powerful Java actions designed to optimize performance, enable dynamic data handling, and extend Mendix capabilities beyond standard microflows.
Overview
The Expert Utils module provides a set of essential Java actions for advanced Mendix developers. These actions streamline data retrieval, object manipulation, and direct database interactions—offering solutions for use cases that go beyond Mendix’s built-in functionality.
Included Java Actions
✅ CalculateHaversineDistance – Compute the great-circle distance between two geographic points.
✅ RetrieveListItemByIndex – Fetch an item from a list by its index.
✅ GetObjectAttributeValueByIndex – Retrieve an object's attribute value dynamically by index.
✅ GetObjectAttributeValueByName – Fetch an object's attribute value using its name.
✅ GetObjectByGUID – Retrieve an object directly using its GUID.
✅ ExecuteNonQuerySQL – Run SQL INSERT, UPDATE, or DELETE statements directly on the database.
✅ ExtractRegexGroupValues – Parse an input string by a specified regular expression and return all capturing group values as a list.
✅ NormalizeString – Normalize a string using Unicode case folding with optional diacritic removal and custom ICU transliteration rules, returning a search-friendly, locale-neutral result.
Key Benefits
🚀 Enhance Performance – Optimize operations with direct object access and efficient data retrieval.
🔧 Extend Mendix Functionality – Perform actions not natively supported in Mendix microflows.
⚡ Simplify Complex Logic – Reduce microflow complexity with reusable Java-based utilities.
Important Considerations
- Expert usage recommended: These Java actions provide low-level access to objects and the database, so use them carefully.
- Security awareness: Direct SQL execution and unrestricted attribute access bypass Mendix security rules—only use in trusted environments.
- Cross-module compatibility: Works seamlessly across different Mendix modules and data models.
Documentation
Typical Usage Scenario
The Expert Utils module is designed for advanced Mendix developers who need greater control over object retrieval, attribute access, and direct database interactions. This module helps solve common challenges such as:
🔹 Dynamic object access – Retrieve attributes without explicitly specifying them in microflows.
🔹 Efficient list handling – Fetch items from lists dynamically without looping.
🔹 Optimized database interactions – Perform bulk updates or deletions using direct SQL execution.
🔹 Geospatial calculations – Compute distances between two points using latitude and longitude.
Where is this useful?
- Performance-optimized applications that require direct object access.
- Complex business logic where attribute names or list positions are not predefined.
- Data migration scripts that rely on raw database operations.
- Custom integrations requiring precise data manipulation.
Features and Limitations
✅ Features
✅ Dynamic Object Retrieval – Get objects using their GUID for direct access.
✅ Flexible Attribute Handling – Retrieve attribute values by index or name, enabling generic processing.
✅ List Operations – Fetch specific items from lists using an index, removing the need for looping.
✅ Geospatial Calculation – Compute the Haversine distance between two geographical coordinates.
✅ Direct Database Execution – Run SQL INSERT, UPDATE, DELETE queries efficiently.
⚠ Limitations
⚠ Security Considerations – Java actions like ExecuteNonQuerySQL bypass Mendix security rules and should only be used in trusted environments.
⚠ Database-Specific Behavior – Direct SQL execution depends on the underlying database engine (PostgreSQL, SQL Server, etc.).
⚠ No Automatic Validation – When retrieving attributes by index, users must ensure indexes exist in the entity structure.
⚠ Limited to Non-Query SQL – The module does not support SQL SELECT statements for data retrieval.