<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kyle Kunzer on Medium]]></title>
        <description><![CDATA[Stories by Kyle Kunzer on Medium]]></description>
        <link>https://medium.com/@kyle.kunzer?source=rss-be1db08b5384------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KvYoPqp7v6EFxUEzLQxOLg.png</url>
            <title>Stories by Kyle Kunzer on Medium</title>
            <link>https://medium.com/@kyle.kunzer?source=rss-be1db08b5384------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 21:52:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kyle.kunzer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Engineers’ Choice — Exploring the Best of Mendix 10]]></title>
            <link>https://medium.com/@kyle.kunzer/engineers-choice-exploring-the-best-of-mendix-10-2e54a4b886f9?source=rss-be1db08b5384------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e54a4b886f9</guid>
            <category><![CDATA[mendix]]></category>
            <dc:creator><![CDATA[Kyle Kunzer]]></dc:creator>
            <pubDate>Wed, 27 Mar 2024 14:22:58 GMT</pubDate>
            <atom:updated>2024-03-27T14:22:58.317Z</atom:updated>
            <content:encoded><![CDATA[<h3>Engineers’ Choice — Exploring the Best of Mendix 10</h3><p>We polled our engineers at Kinetech for their favorite new features in Mendix 10 and we wanted to share them with you. Here they are, in no particular order:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_Q0cFsl0jW9pI9uG7IZhQ.jpeg" /></figure><p><strong>One: Solution Kit (10.0.0)</strong><br>The Mendix Solutions Kit is a powerful capability designed to address the challenges faced by large enterprises when building and customizing software solutions. The ability to protect module components (domain model entities, microflows, etc. ) while giving developers the ability to further extend off of a protected core enables the case for continuous upgrades while preserving local modifications. Enterprises are empowered to build reusable, controllable, and adaptable solutions with Solution Kit.</p><p><strong>Two: Java Dependency Management (10.3.0)</strong><br>This feature was high on my list because I am one of the go-to people to help resolve Java dependency issues in projects after events such as a module update (looking at you Excel Import and Export modules!). Hunting down which dependencies were duplicated can be a real chore and now, with the new managed vendorlib folder in Mendix 10 projects, these kinds of issues should be much less frequent. Dependency management can now be done in Studio Pro on your modules, and Gradle will resolve conflicting dependencies automatically by selecting the most recent one.</p><p><strong>Three: Multiple Page Parameters For Page URLs (10.0.0)</strong><br>The page parameter feature has been available for a while now, but it was always limited in use because only the ID of the page’s context object could be used, of which there could only be one.</p><p>Now that pages can have multiple page parameters it was only natural that Page URLs would follow suit. Not only can Page URLs have multiple object parameters now, but we are not limited to just the ID of the object; we can select other attributes as well.</p><p><strong>Four: Microflow URLs (10.3.0)</strong><br>Similar to #3, now we can give our microflows a URL with multiple parameters (and primitives!) so that the microflow can be executed via a URL. If the microflow has a Show Page action, then the specified page will be shown inside of the homepage. This is a great feature not only because it unlocks a great way to get users to the application, but also because this can replace some commonly used modules such as Forgot My Password.</p><p><strong>Five: XPath Aggregation and Calculation (10.3.0)</strong><br>Some great XPath utility has been added in the form of aggregate function (sum, avg, count, min, max) and operator (+ , - , * , div, mod) availability in constraints. That means you can have an XPath constraint such as this now:</p><p><em>[sum(MyModule.OrderLine_Order/MyModule.OrderLine/(Amount * Price)) &gt; 100]</em></p><p>eliminating the need to do these calculations in variables and with Aggregate List actions to make the determination.</p><p><strong>Six: React Client (10.7.0)</strong><br>Currently in GA Beta with a full release slated for 10.12.0, the React Client is the new Web Client for the Mendix runtime. This feature could be a real game changer for user experience. The current Mendix Web Client waits until the entire content of a page is loaded before the page is displayed, showing a progress bar to the user to indicate that some action is being taken and that they should wait. The new React Client features incremental page loading, where the core structure of a page is shown immediately (layout, headers, etc.) and content is added to the page as it loads, meaning users will no longer have to wait for a page to load, only for individual components to render, giving the perception of a much faster website.<br><br>The big downside here is that when the React Client becomes for de facto web client (assumed that this will be in 10.12.0) then some beloved older non-pluggable widgets will no longer work. I want to take this moment to remember AutocompleteForMendix and BootstrapMultiSelect: You will be missed. <strong>RIP</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efN9L174X_Lu7AaIuWN8-g.gif" /><figcaption>Left: React Client Right: Old Web Client</figcaption></figure><p><strong>Seven:</strong> <strong>Reverse Association In Domain Model (10.3.0)<br></strong>This is a simple, but useful feature where an association in a domain model can be reversed by a new option in the right-click menu. Not much more to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*Sc0ieAEaTNar4gvFt9pFlw.png" /></figure><p><strong>Honorable Mention: Combo Box Widget</strong><br>This is an honorable mention because technically it was available for use in later versions of Mendix 9, but it’s worth calling attention to this widget since it has some tie-in with #6, the React Client.</p><p>The Combo Box widget combines all of the functionality for dropdowns, reference selector, and reference set selector widgets in a single widget, making for a really consistent UI for all of these use cases. The widget also has search capability making it easy to find and select references.</p><p>When the React Client becomes the only web client in Mendix the reference selector and reference set selector widgets will no longer be available and Combo Box will be the replacement for all of them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e54a4b886f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functional Nirvana with Playwright Tests for VSCode]]></title>
            <link>https://medium.com/@kyle.kunzer/functional-nirvana-with-playwright-tests-for-vscode-63b730e7778c?source=rss-be1db08b5384------2</link>
            <guid isPermaLink="false">https://medium.com/p/63b730e7778c</guid>
            <category><![CDATA[application-development]]></category>
            <category><![CDATA[testing-tools]]></category>
            <category><![CDATA[playwright-test]]></category>
            <category><![CDATA[functional-testing]]></category>
            <dc:creator><![CDATA[Kyle Kunzer]]></dc:creator>
            <pubDate>Wed, 07 Feb 2024 18:02:01 GMT</pubDate>
            <atom:updated>2024-02-07T18:02:01.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CXC2yFPz4C5E7Wu9olGLQw.jpeg" /></figure><p>Functional testing is a critical step in the quality assurance process, as it ensures that the software is reliable, robust, and meets the end user’s expectations. It involves testing the core operations of an application, ensuring that users can easily navigate, checking if it is user-friendly, and examining how the system handles errors. Comprehensive functional testing can save a lot of time and cost because it helps identify issues early in the development cycle, thereby reducing the cost of fixing them later when the application is more complex.</p><p>Functional testing can be done manually or automated, but let’s face it, as a developer, if I can get back time by automating test scenarios, I most definitely should do it.</p><p>Recently I had my own automated testing epiphany: I was browsing through extensions to <a href="https://code.visualstudio.com/Download">VSCode</a> when I saw a familiar icon. Enter <strong>Playwright Tests for VSCode!</strong> I have previously used <a href="https://playwright.dev/">Playwright</a> for some of its other functions, such as capturing PNGs and PDFs of webpages, but I was familiar with it as a testing technology as well. I don’t think I’ve ever hit Install so fast on an extension before!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/186/1*ATt3b_wk6aS0A0lBaooLdQ.png" /><figcaption>This happy little mask cures my testing anxiety</figcaption></figure><h3>Getting Started</h3><p>Thankfully other than a couple of extra button clicks, the install was very straightforward. After installing the extension, there are two other things to take care of:</p><p>🛑STOP — Do you have Node.js installed already? If you do, please continue and if not, get the latest LTS version <a href="https://nodejs.org/en/download/">here</a> before continuing.</p><ol><li>Designate a folder on your computer to store the tests. This is important because in the next step the Playwright node module will be installed, and it needs a home. This folder (new or otherwise) can be further organized as you see fit, but the node module and test scripts should live under the same top-level folder.</li><li>Use the VS Code Command Palette (Ctrl+Shift+P or View &gt; Command Palette), type Install Playwright, which yields the box below. You can choose which browsers to install for testing and if you prefer JavaScript over Typescript, you can enable JavaScript tests.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*_cBpQY99Nv3a_txLhJTEQQ.png" /><figcaption>Playwright Test for VSCode install options</figcaption></figure><p>And that’s it! Now we can get to creating and running some tests.</p><h3>How does this work?</h3><p>Once installed and configured, you’ll notice that a little beaker icon is available on the sidebar if it wasn’t there before: this is the Testing tab. From here we can see all of test scripts (remember they should be under the same parent as the node module) and are given the ability to create new tests or run existing ones.</p><p><em>How will I create new tests? I’ve never used this before and I don’t want to/have time to learn!</em> No problem! — record them yourself with Playwright! If you know how to use the web app you want to test, you can record tests!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/206/1*4wtWh3b3ZEtQ7TX5sWJQcA.png" /><figcaption>Locate this menu at the bottom of the Testing pane</figcaption></figure><p>The Record new option will open a browser (Chromium by default if you chose to install it) to a blank tab. From here, enter a URL and start using the webpage. Playwright will record your actions and automatically write in the test step as you interact. That also includes entering text or changing the URL, so logins, form filling, etc. are all fair game. When you’re satisfied that you have recorded the steps to fulfill your test requirement, simply end the recording using the record button on the small menu at the top of the browser window. Playwright will have created a new TS/JS file in the tests folder, and now you can actually run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jk-G95WkooJ4cURWzTWgeg.png" /><figcaption>A blank canvas for a recording. Controls at the top, current locator at the bottom. The red background shows the current locator, which will update as you move the mouse around.</figcaption></figure><p>On the Testing tab your recorded tests are displayed and ready to run. There will be three options on any highlighted row:</p><ol><li>Run test — run the test script without interruption until it passes or fails.</li><li>Debug test — allow the use of breakpoints in the script so that you can step through at your test at your leisure.</li><li>Go to test — will take you to the test file in the Folder view.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*rUf6DHgRdS_3NaEf4A5-aw.png" /><figcaption>A test hierarchy: folders in folder with tests. You can initiate tests from any level to launch one or more tests quickly.</figcaption></figure><p>You’re able to run from any part of the test hierarchy, meaning you can run multiple tests (like an entire folder) or individual test functions from within a single test script. While testing it will capture the measurements of time it takes to perform a step as well as a reason for a failed test, but not much beyond what action it could not perform. In the end your tests will report either a Pass (green check) or a Fail (red X) indicating the outcome.</p><h3>Use Cases</h3><p>The obvious answer here is to do testing, however, I can see a way to use recorded tests in a demo capacity as well. By giving yourself the ability to launch a test and show the browser as it performs the steps (hint: the click() function has a delay prop so you can set time in ms before the click happens) you can talk through what is going on. Alternatively, you can launch the test with debugging and set an early breakpoint so that you can step through at your own pace as you demo. Consider too that you can run existing tests in regression to ensure that integrity of the front-end as development presses onward.</p><p>I’m looking forward to getting a lot of mileage out of this extension as a part of my development process. What I have shared is the tip of the iceberg with the extension; things like writing multiple test functions in the same test script to get functional test units, or using assertions alongside the test steps to ensure front-end integrity are but a few. I encourage my readers to learn more for themselves, and even just the extension documentation is great place to start. Otherwise, the Playwright documentation was linked earlier, so check it out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63b730e7778c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Living On The Edge: Mendix On An Embedded Device]]></title>
            <link>https://medium.com/@kyle.kunzer/living-on-the-edge-mendix-on-an-embedded-device-0e9629e14a2d?source=rss-be1db08b5384------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e9629e14a2d</guid>
            <category><![CDATA[kinetech]]></category>
            <category><![CDATA[mendix]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Kyle Kunzer]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 20:36:29 GMT</pubDate>
            <atom:updated>2024-01-08T20:36:29.324Z</atom:updated>
            <content:encoded><![CDATA[<p>I was recently asked about Mendix in the context of Edge computing; that is where an application exists close to a data source as opposed to on a centralized application server. Commonly this is known as IoT. Because the edge device is running an application that is able to collect data directly (or very nearly) from the source of the data, benefits include improved response times, faster insights and improved bandwidth availability.</p><p>The concept and value of these kinds of deployments is not foreign to me. I have created my own embedded devices in the past using Raspberry Pi SBCs (single board computers), but those are strictly in Python and mostly using computer vision (something I have a great interest in). Therefore, I set myself a challenge:</p><ul><li>to learn if it was possible to deploy Mendix at the edge</li><li>and if possible, to try to do it myself and create a temperature and humidity sensor application for my greenhouse</li></ul><h3>Do A Little Digging</h3><p>My first instinct was to check the Mendix documentation, and sure enough, there was information on deployment for Edge devices, but in reading it seemed to require that Siemens Industrial Edge was used, which I do not have access to. For all intents and purposes it seemed like my journey was already at an end, that is until I came across a MendixLabs Github repository <a href="https://github.com/mendixlabs/mendix-for-balena">(link)</a> from a couple of years ago that suggested it would be possible without Industrial Edge. Emboldened, I gathered some components and pressed on.</p><p>The Github had a pretty good outline of what steps I should take and the hardware that was used. To summarize, this was what I ended up needing from both a software and hardware perspective:</p><ul><li><a href="https://www.balena.io/">Balena.IO</a> (used to manage and deploy services to my device)</li><li>Raspberry Pi (I had a v4 4GB that was unused)</li><li>Temperature + Humidity sensor (to collect some meaningful data via the Raspberry Pi)</li><li>Mendix Cloud Foundry Buildpack (the Github repository)</li><li><a href="https://mosquitto.org/">Eclipse Mosquitto</a> (this is a MQTT server, so I would be able to collect sensor data and send it here, just like a real-world IoT device)</li></ul><h3>Go Make It</h3><p>The Mendix application was built for simplicity to perform only a single task: retrieve the temperature and humidity from the sensor over the GPIO pins on the Raspberry Pi. To interface and receive the sensor values I made use of the <a href="https://pi4j.com/">Pi4J Java library</a>, creating Java actions to read values from the pins I had chosen for the sensor.</p><p>Sensor readings are sent to a topic on the Mosquitto server via MQTT. I then made the application subscribe to the same topic so that the application could show a timeseries of recent temperature and humidity readings on the homepage when accessed.</p><h3>Build + Deploy</h3><p>Deploying the Mendix application onto the Raspberry Pi cannot be done using the methods we are most used to. This is where the instructions in the Github repository really helped. By following the instructions, I downloaded the repository to my computer, added Balena as a remote to the local repository, created a local deployment package for my app, updated the docker-compose file to configure runtime settings for my app and pushed the updated repository to Balena. Balena would then package AND deploy directly to the devices I had in the linked IoT fleet; in my case this is just the single Raspberry Pi, but I could easily add more now and have the same package deployed in minutes to them. I cannot recommend using a service like Balena enough if any readers want to try this themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnJKFWZHKCAbec77P0J1-g.jpeg" /><figcaption>Balena’s Device Dashboard. We can see the Mendix application starting in the Logs</figcaption></figure><p>Along the way there were some hurdles to overcome. The Github repository was a couple of years old, and the configuration it has suggests that it was created pre-Mendix 8 (it was still using Java 8, not 11 like we have been using for a while now with Mendix). Some updates and revisions were needed to make it compatible with more recent versions of the Mendix runtime, as well as updates for other deployed services as well.</p><p>All in all, the process was not very difficult with the exception of having to figure out the correct revisions to make. The end result is a Mendix application that quite literally runs in the palm of my hand, and is supported by PostgreSQL and a web server, all on that one small device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zY9j13uOkXopKldpLX6xNQ.jpeg" /><figcaption>The finished product with leads for the sensor and a camera ribbon (future)</figcaption></figure><p>This was a very fun side project to experiment with and I was very pleased with how it all came together. I plan to expand on the application to really push the limits of what this little device can handle in terms of a larger, more complex application. The door is clearly ajar for this type of deployment, so I am curious (and hopeful) for what may come in the future regarding Mendix deployment on the edge.</p><p>To any readers that are interested in trying this and have questions, feel free to reach out to me at <a href="/service/mailto:kyle.kunzer@kinetechcloud.com">kyle.kunzer@kinetechcloud.com</a>. I’d love to hear from you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e9629e14a2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power BI Embedded In Mendix]]></title>
            <link>https://medium.com/@kyle.kunzer/power-bi-embedded-in-mendix-e90260d43ca0?source=rss-be1db08b5384------2</link>
            <guid isPermaLink="false">https://medium.com/p/e90260d43ca0</guid>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[mendix]]></category>
            <dc:creator><![CDATA[Kyle Kunzer]]></dc:creator>
            <pubDate>Tue, 28 Nov 2023 16:48:12 GMT</pubDate>
            <atom:updated>2023-11-28T16:48:12.605Z</atom:updated>
            <content:encoded><![CDATA[<h3>Seamlessly Embed Power BI In Mendix</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*n2FyGrI_4zInCxX8abzrdA.png" /></figure><p>It is a typical requirement for applications that they should contain some level of reporting, whether that is achieved simply with tables or with gorgeous dashboards filled with visualizations of your data.</p><p>With Mendix, developers can design impactful dashboards in applications using a host of widgets included in the platform or from the Marketplace, but these widgets depend on the data being available within the defined model, persistent or otherwise. So, what if you want to be able to display data from other systems, without going through the hassle of defining a model to consume and then display data from an external source? <em>The answer:</em> leverage a technology like Power BI that can report on combined datasets and embed reports seamlessly into your applications.</p><h3>What is Power BI?</h3><p>Power BI is Microsoft’s premier product for business intelligence. In recent years Microsoft has established itself as the clear leader in the quadrant for analytics and business intelligence platforms. Within the platform you can consume and combine data for analysis from a wide range of data sources such as Excel, OData, SQL, and RSS. The inclusion of OData in particular is great news for Mendix because we can expose this natively from our applications. As an added bonus, reports can also be updated outside of the Mendix application in Power BI resulting in no downtime to update the styling or when adding new visualizations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*Nc6e1obU0SYPLZnzl4EoAQ.png" /></figure><h3>What Do I Need To Get Started?</h3><ul><li>Access to Microsoft Azure Active Directory (Azure AD)</li><li>A report in Power BI Service (<a href="https://app.powerbi.com/">https://app.powerbi.com</a>)</li><li>Domain verification is required so that the client organization can manage their Azure tenant, otherwise the tenant is managed by Microsoft on their behalf and necessary settings cannot be applied (i.e. API permissions)</li></ul><h3>Setting Up Azure</h3><p>To facilitate authentication to the Power BI service, you will have to create an app registration in Azure Active Directory. This app registration will become the de-facto “user” that accesses the reports in Power BI. From the app registration you will need three pieces of information</p><ol><li>Your Azure tenant ID</li><li>The Application ID (also known as Client ID) of the app registration</li><li>A secret key generated from the app registration</li></ol><p>This information will be used later on by the Mendix application to perform the necessary authorization steps to embed the Power BI reports with proper access control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SblpdxCamvS-1kp8w6U-qQ.png" /><figcaption>Application ID and Tenant ID can be found in the header of the app registration</figcaption></figure><p>Additionally, the app registration must be granted API permissions to the Power BI APIs available in the Microsoft Graph API</p><h3>Power BI Service</h3><p>In addition to having at least one report and associated dataset in the Power BI service, you will also need the following information <em>per report </em>that you wish to embed.</p><ol><li>The unique ID of the report in Power BI</li><li>The workspace ID of the workspace where the report resides in Power BI</li><li>The default embeddable URL of the report</li></ol><p>Additionally, the app registration that was used above must be granted permission to view the reports in the workspace.</p><h3>Bringing It Together In Mendix</h3><p>In order to embed Power BI reports into a Mendix application it takes two parts: a module to set up the tenant and report settings, and a widget to perform the authentication into the Power BI service and display the retrieved report.</p><p><strong>Module:</strong><br>You will want a module to help store the settings relating to the authentication with Azure and the Power BI reports that will be embedded. The module will also contain the “heavy lifting” required to correctly embed reports in the way of microflows and REST integration with Microsoft’s authentication endpoints.</p><p><strong>Widget:</strong><br>The widget accepts 3 parameters: an access token, the ID of the report to embed and the embeddable URL. While you could use the embeddable URL as the source for a standard IFrame, you will find that attempting to access the URL directly will prompt for user credentials, resulting in a poor user experience, especially if there are multiple reports embedded in a single page as each will require credentials. The widget will pre-authorize the URL so that the report loads without asking for authentication.</p><p>Another great feature of the widget is the ability to automatically apply report filters when returning the report so that you can constrain the dataset based on the implementation. An example of this would be filtering based on a user’s department so that the Power BI report only shows the data in the dataset relevant to them. The microflow that sets up the widget parameter object also allows for dynamic report filtering because a list of filters can be created in that microflow prior to passing on to the widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9DrDVcZJiLPp4xFftvqpw.gif" /><figcaption>The widget embeds the Power BI report seamlessly into the application.</figcaption></figure><p>While there is a good amount of work upfront to set up the integration of Power BI in a Mendix application, thankfully it only needs to be completed once. After that you can enjoy having gorgeous, highly interactive reports in your application that are not constrained by the data available to the application directly.</p><p>For more information or if interested in the implementation feel free to reach out to me at <a href="/service/mailto:kyle.kunzer@kinetechcloud.com">kyle.kunzer@kinetechcloud.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e90260d43ca0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DIY Search In Your Mendix Apps]]></title>
            <link>https://medium.com/@kyle.kunzer/diy-search-in-your-mendix-apps-787ed0898a44?source=rss-be1db08b5384------2</link>
            <guid isPermaLink="false">https://medium.com/p/787ed0898a44</guid>
            <category><![CDATA[mendix]]></category>
            <dc:creator><![CDATA[Kyle Kunzer]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 19:46:19 GMT</pubDate>
            <atom:updated>2024-06-24T20:24:22.955Z</atom:updated>
            <content:encoded><![CDATA[<p>While there are a lot of easy ways to include searching with your Mendix widgets, you may want to consider building your own search functionality to have total control over the UI/UX and to take advantage of some of the fantastic Marketplace widgets. Creating custom search functionality is simple and can result in engaging reusable components for your application.</p><p>Consider the following domain model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*JzqR02AfZ5Md0qPZLJl6XQ.png" /><figcaption>Example domain model for an ordering process</figcaption></figure><p>In this example I am creating a custom search feature for an Order Overview page. I want to implement a custom search because I want full control over the way the search is presented, so this method allows me to lay out and style my search fields in any way I choose. My page starts with a datasource microflow to bring in Search and nested within the Search dataview is a datagrid of Orders to show the results of my search. I have laid out my search fields and added a couple of helpful widgets to handle my reference set associations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yEetB8h1guzXeFGfqUDGOA.png" /><figcaption>Any layout is possible, and Marketplace widgets can make for a better UX overall</figcaption></figure><p>When the Search button is clicked, a microflow is called to evaluate my current search criteria and return a list of Orders. In essence this microflow performs a retrieval of Order from the database with XPath. To make it easier to understand for my less experienced colleagues, I have created a couple of variables to help make the XPath easier to read and understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3nWssOp5V0PNjV9IGkFw1g.png" /><figcaption>Microflow to retrieve Order results based on Search attributes. This can be triggered by a button for manual searching, or on-change of the Search attributes for real-time filtering</figcaption></figure><p>Each variable helps to pre-evaluate the associations that can be made from my Search entity and check to see if those associations are empty or not. When empty, my variable will be True, and when at least one record is selected over association it will be False. This will help me later when I am writing my XPath constraint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*lYXY0Dz6rYRiHPVB1LmG2w.png" /><figcaption>The Boolean variables check for the lack of selected records over association</figcaption></figure><p>When writing my XPath constraints, I make use of the Boolean variables with an OR so that if the variable is True it will skip to the next constraint, OR if false then it will constrain my Order results appropriately. While the variables are not necessary because you could simply check for the empty associations in the constraint, they do make it easier to read and explain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*ESbK9EWU87-P36F3xGsxFg.png" /><figcaption>XPath example showing the use of the Boolean variables</figcaption></figure><p>The resulting OrderList is returned and I use a <em>Change Object</em> action so that I can set the Order_Results association to the returned OrderList. Adding the <em>Refresh In Client</em> option ensures that my datagrid updates with the new list of Order results.</p><p>The application now has a working custom search implementation that looks great and is very easy to extend with additional attributes or associations as the application develops further.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=787ed0898a44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>