Getting company information

1
I want to show company information in a dataview. If I make an account I also add the company with it thru a Non-persistable entity. I am wondering if I can show both in a dataview or if I can show only the Company of the current user.
asked
3 answers
0

you should be able to show both on a single page - if you create the dataview for account, company can be shown via a reference selector. Just curious, why is the company information in a non persistable entity? Do you reset the company each time a user logs in?

answered
0

Gabriel, assuming you have 2 entities, account and company, create an association between the two such that one company can be associated with many accounts. Next, create a page, put a dataview on the page and point the dataview to the account entity (select which attributes of the account entity you would like in this dataview). Finally, put a reference selector in the dataview and point the reference selector to the account/company association you have created. This will enable you to see the association (containing the company name or other company attribute), in the dataview. If you would like to see an example of this, you can download the Company Expenses or Employee Directory sample apps - both of these have a number of parent/child relationships of the type you are describing.

answered
0

Gabriel -

this type of page would typically be called as the new and/or edit page from a datagrid. In this way, you would create a page with a datagrid listing all accounts, and select this page as the new/edit page. Then when you create a new account or edit an existing account, the page would have an object passed in without the use of a microflow. As Eric mentioned, the online training would be a great place for you to start - what you are trying to do is a trivial exercise in Mendix and can be accomplished in less than 5 minutes with the proper training.

Mike

answered