Automating Connections Between Seperate Parts of a Form Application
Issue I have been struggling with over the past week, and I think I’m just missing a basic piece of the puzzle. I am creating an application to have users fill out an online application. For that application, there are several sections, some of which may have multiples. Right now, I have a general “application” object in my domain, and then separate entities for each section of the application. I have associations created between the Application entity, and each of the child entities. I have made countless (unsuccessful) attempts to do the following: Allow the user to create a new application (they can have multiples) Click on a button to add each section of the Application Save all associations back to the parent Application entity so they all may be referenced as part of a single “Application” While I have been able to get context selectors to show up in some cases (that allows me to manually associate with the parent asset), I guess what I’m asking is how to I make an automatic association with the parent entity? For example, if a user creates an application, then goes to another form to fill out their address information, how do I let Mendix know that I want that object to be immediately referenced back to the parent object, so that I may call the data with a parent-child reference? I’ve tried everything from creating the form using the overall reference (application.address.field) which just yielded forms I could not fill out, to trying to nest things within a data grid so that Mendix “knows” how to make the association. So far, nothing has seemed to work. Any help would be greatly appreciated.
You have a few options here but they all involve the use of a microflow:
When the button is clicked you run a micoflow passing in the application object, create the new object and set the association to the application at that time. There you can present the screen showing the section either directly or through association to the application object
You can create all of the sections up front and know they are all indeed in existence. You can then just show forms that have the application object but your section object view embedded data view using association
Whichever you choose, make sure you are committing things along the way.
Thank you for the response. It was very helpful!
One follow up if I might – when I reference the Application record, then create a new object for an Application section, then open a page, it works just fine, but how to I avoid it displaying fields for the Application (that I called) along with the new Application section fields?
Well you’re in control of the fields you display on a form. You can point , click, and delete or you can use the connector to add fields as you see fit.