Remove the empty selection in reference selector

0
In my application I managed to show the currently logged in user in a reference selector. It is an association with my Entity and the Accounts Entity. I used the xpath [id = $currentUser] to filter out the other users in the reference selector. It works ok. But the selector is initially empty, and a user has to be selected by clicking. What I want is to only show the currently logged in user initially selected, without clicking the reference selector to select. How can I get rid of the empty selection ? Actually, I don't need my end user to select the reference selector to select the currently logged in user, what I want is to automatically select the currently logged in user, and the reference selector can be shown read only. Please help Regards
asked
1 answers
1

Dilan

To do this, you can open the page you are working on using a microflow and set the association in the microflow before opening the page.  I'll assume you are creating a page for the Supervisor_Funds entity.  In the event that you are creating a new Supervisor_Funds object, you could create a microflow that looks like this:

The Supervisor_Funds_Edit page would look like this:

And on a datagrid page listing all supervisor funds, you could call this microflow with an action button:

If you want to see the microflow, you'll find it in this Model Share:  

https://modelshare.mendix.com/models/2b71f0eb-84ae-4477-aaad-0917bc52485a/create-new-supervisor-funds

Hope that helps,

Mike

 

 

answered