Passing OQL with a parameter to a java action

0
I need to generate an excel from the data in my system. I need to loop through a list of organization, retrieve data and create an excel per organization. I am trying to extend the OQL, which I pass to the java as a string, constrained by organization but don't know how to configure the WHERE constraint. The base OQL string (some things replaced) is: 'SELECT a/ExternalIdentifier as var1, a/Name as var2, b/Number as var3, c/FullName as var4 FROM ProductsAndTransactions.Identifier as b INNER JOIN xxxx as a INNER JOIN yyyy as c WHERE b/Status=''zzzz''' I want to extend it with something like and b/ProductsAndTransactions.Identifier_Organization/PersonsAndOrganizations.Organization=' + $Organization Where the $Organization comes from the microflow context. How can I do this?
asked
2 answers
1

You should use the identifier of the organization, in other words if you pass the organization proxy to your java action, you can use it like this:

organization.getMendixObject().getId().toLong()
answered
1
INNER JOIN /ProductsAndTransactions.Identifier_Organization/PersonsAndOrganizations.Organization AS ORG
WHERE ORG/ID = $Organisation
answered