passing variables

0
Depending on the Entity (path) name of a data view I would like to retrieve data from the not-associated entity with the same attribute name to fill in my data grid. In other words: I would like to have my data grid filled in by the value of the attribute “Person” from the entity “Study”, based on the other entity called “Person”. The tricky part is how to accomplish the comparison: entityXName = entityYAttribute ? I think I have to do it 'programmatically' (xpath, microflow, java(script)…) but don’t know how to create a variable based on the entity name - in this case Person. Thanks in advance!
asked
4 answers
1

Damir,

I am not quite sure what you want to achieve here. How is your domain module set up? Do you have an entity persons and an entity studies and do you want a dataview of the person with the list of studies the person is doing?

You could achieve that by making a reference between studies and persons and making a dataview person with a reference selector of studies. This way you could add and remove studies to the person.

Or am I missing the point you want to achieve here?

Regards,

Ronald

answered
0

If I understand what you want correctly, you could use a microflow that does a retrieve from the database [Name = $entityY/Name]

Something like that.

answered
0

Thanks guys.

Let me try to clarify things.

Actually I would like to retrieve all data from the table Study, attribute Person. Why the particular attribute Person? Well, because other table is called Person as well.

The match I’m looking for is tableX = tableY.attributeX

The entity my data view is based on is not known upfront. So the Microflow doesn’t have a clue which input parameter it’s going to receive. The Microflow should have some kind of a generic method to process all input the same way.

So the only thing it knows initially is the name of a resource table, i.e. Study and the fact that in this table one can find the attribute with the same name as the name of the input parameter, i.e. the table (entity) that I use to generate my data view - Person.

My problem is that I don’t know how to make this generic input shizzle and this Xpath comparison nodeX = nodeY/childNodeX.

Thanks anyway

answered
0

The entity my data view is based on is not known upfront. So the Microflow doesn’t have a clue which input parameter it’s going to receive. The Microflow should have some kind of a generic method to process all input the same way.

How many potential entities are there that the dataview might receive? Do these entities already exist in Mendix?

answered