Retriving Companies so costumers can see each one to choose

Hello, devs! How are you?   I am working on a project for a small store where: There are "customers" and "companies". During the login creation, the user decides whether they want to be a "company" or a "customer". What I wanted to do was: on the main screen of the "customer", display all the created companies, so the customer can choose which company to select and which product to choose from that company. I have already tried to fetch the Domain Model using only the name of the "companies", but I am not able to perform that "Retrieve" action. My “LoginHelper”, is created with all infos about the user (even company, and costumer, and there datas (like email, cellphone etc)). Here are some screenshots of the project: my domain model: My home page (where I want the companies):   My home page in web:   In an attempt to solve this problem, I tried a few things: Since each user is linked to a role, I tried to retrieve (both in microflow and XPath) “Users” Where “Role”=”Company”; but it didn't work. That's why I included the company in the same domain model as the customer, as I thought it would be easier to fetch, but I couldn't make it work either. Do you have any tips?   Regards, devs! Best regards, Augusto Santana     Images of the microflow that creates a “Company”:
1 answers

Hi Augusto,


Thanks for asking your question on the forum. As you are talking about ‘Customers’ and ‘Companies’, it's a bit hard for me to follow along. In you domain model, I can only see the “LoginHelper” object. I am not totally sure what's in there and if you successfully stored all the companies in dit entity. Could you elaborate on that a bit more?


I afraid that you are trying to mingle several things into one here. Mendix offers user management out of the box. In your app, I see a plain text password field. Potentially you would want to follow a few more learning paths to get your app foundation right. When you have setup users correctly (and you have access to them) you should be able to retrieve users with the role ‘Company’ for example.