How to retrieve tenders for invited companies

0
Hello, New to Mendix I'm stuck on this seemingly simple task: I'm making a simple tender tool where companies can invite other companies to tenders. Users should only see tenders that their company have been invited to. But I can't figure out how retrieve the list of tenders. User is *_1 to Company Company is 1_* to InvitedCompany InvitedCompany is *_1 to Tender Using logged in user I get the Company of the current user - but how to get from from company to the Tender? Appreciate any input! Thanks :) Fredrik
asked
4 answers
0

If you have the dataview of the company place a data grid Tender inside. Then use a datasource microflow to retrieve all the tender object where the reference matches the company.

Regards,

Ronald

answered
0

So, let's see if I get your setup correctly.

  • A User can have one Company
  • A Company can have several InvitedCompany
  • An InvitedCompany can have one Tender
  • A Tender can have several InvitedCompany

As I read it, there is no relation between Company and Tender, correct? If that is true (and intentional), there is no way to directly get a Tender for a Company.

Either you can get to Tender via InvitedCompany:

InvitedCompany_Tender/InvitedCompany/InvitedCompany_Company = $Company

(pseudocode, obviously) should yield a list of tenders. Not a very clean solution though, it seems.

Better alternative seems to be to also create an association between Company and Tender, so you can easily retrieve

  • all tenders for a company
  • all invited companies for a tender for a company.
answered
0

Hello,

There should be a relation between Company and Tender. Maybe I've got the relations mixed up. The purpose of the InvitedCompany "Table" is to connect Tenders with those Companies that have been invited to the Tender. To bad it is not possible to attach a image of the model....

In addition to the previous mentioned relations there are two more between Tender and Company:

Tender_Company *_1 [Buyer] Tender_Company *_1 [Broker]

:) Fredrik

answered
0

Hello again,

The association works as I can display a table of Invitations including the associated Tender and Company. What I'm trying to acheive is in SQL an innerjoin - how do I do that using a microflow?

Thanks :) Fredrik

answered