In a reference selector or dropdown, I cant select the Attribute-path?

0
Hi to all of you, I think, I got a logical problem again. I've got the following data model:   Now on the "Home"page I want to put a reference selector of all of the Orgunits. By clicking on that Orgunit, it shall redirect the user to the Planning page where he sees a list of all Planning objects associated with the clicked orgunit. Now when I select a reference selector or a drop-down-widget, i cannot select the orgunit entity, which is already my problem: I've tried to change the "string" attribute of the organisational unit entitiy to an "enumeration" attribute which worked well, but these enumerations-attributes of course aren't connected to the master data which is associated with the "string"attribute of the organisational unit - entity. Does anyone has a clue how I can overcome this? I want to select the orgunit-attribute of type string within the reference selector. If this isn't possible, it would be good to know if there is a way to associate the enumeration attribute with the string attribute which is connected to the master data. Here is my Home page with my selected page parameters and the "Select entity"-window: Thank you already in advance!   Laura
asked
5 answers
2

I think what you are trying to do is retrieve the Orgs as a list of values in a dropdown, correct? Then once selected, show the planning objects associated to that Org.

To build this workflow, you need to start with an object that is one to many reference to the orgs so that you can establish the reference over the association and achieve that list in that dropdown. Does that make sense? So you might create a "Transaction" entity (or whatever) to establish the DataView object for the page and associate that to the Orgs so the dropdown can display all orgs and the widget functions as you desire. Then the "on change" microflow can kick off retrieving the related planning objects and so forth.

TL;DR - You need to create an object with one to many to Orgs for the dropdown widget to work in your use case. 

answered
0

No Problem, almost there! When you create the "Transaction" object, you want to retrieve the list of organizations and then use the iterator object to Change Object and associate them to the transaction object, then Commit the Transaction object outside of the loop. That way you'll have the list of Orgs associated and you can now see them. :)

answered
3

Laura,

You do not need to have another dataview for the organisationalunit. You are able to navigate through the association that you have set up from the planning object.

 

You should be able to add the ref selector and go through Planning_2_OrganisationalUnit_2 association much like the image above

Take a look at the learning paths for more information. This is a great place to learn the mendix concepts. Specifically here https://gettingstarted.mendixcloud.com/link/module/5/lecture/243 for this issue.

answered
1

Hi Nolan!

Thanks a lot for your explanation! I did as you said: I created a new entity and it really worked, I now can select the Organisational units for the reference selector - but as there is no connection with the master data, it won't display the org units I've put into the app.  Do you know how I can resolve this?

This is my reference selector:

This is the association I selected for the reference selector:

And this is my new association in the domain model:

The reference selector remains empty with those settings, although I've put data into the app.

Thanks! 

Laura

answered
0

Hello Laura!

 

Have you found the solution? I am facing the same problem.

Thanks,

Gergő

 

answered