How to write this Xpath..2 entities..LoanRequest and Author. A loan request is associated to an author.

1
How to write this Xpath..2 entities..LoanRequest and Author. No association. Author inherits from System.User and has 2 attributes minAmount, maxAmount. I need to create a data grid of LoanRequest with datasource as database and Xpath such that I show only those LoanRequest where its attribute loanAmount lies between minAmount and maxAmount of the logged-in user. I need to do this with xpath+database as source and not microflow due to performance reasons.
asked
1 answers
4

I don't think you can use an xpath on a grid directly, but you can use a microflow to prepare the data and then use an intermediate associated object to show it, i.e. you don't have to use a microflow as the datagrid source and do the query every time.

The microflow would be like this:

https://modelshare.mendix.com/models/3af7965b-686f-4c8d-a1f0-c83698554261/casttoauthoranduseinxpath

Inside the expression:

First cast the $currentUser to the required Author type, then use it in the xpath.

answered