microflow list will not show attributes

0
hello! piggybacking off of my previous question: https://community.mendix.com/link/questions/117435   i have created a helper entity to try filter out data from 2 different entities. entity a (invoices) and entity b (payment) share a common attribute but under a different name (just the way our sql tables are set up). each one of these entities pulls data based on a microflow that uses an execute query activity. i am trying to create a microflow using the helper entity (entity c) to try to filter the list. basically if the invoice has a payment then i want it to appear on the list.  this is how far i got in my microflow. but the decision will not allow me to select an attribute from my payment list.    can somebody please help me out with my microflow? thanks!
asked
4 answers
0

Hi Corina,

 

Check below screenshot for example , you can refer for how it will look alike but for logic I have explained below.

 

Inside loop once you filtered using the condition, you need to check whether filtered list is empty or having some object to do that add condition like this 

 

Consider your filetered list variable name is filteredList then

 

$filteredList!=empty  – if this is true then add it to your payments_obj list if not continue with next invoice in loop

 

 

answered
0

Ok so what I understand you have 2 lists? An invoice list and a payments list and you want to compare the values of documentnr vs invoicenr?

What I would do is iterate over the invoice list with a loop. Within that loop you can add a filter/find operation. With this operation you can compare the value of the iterator versus an attribute of that list.
The result is either 1 object or a list of objects, depending on if you use the filter or find.

Hope this helps!

answered
0

It looks like you’ve got an association between the two entities in your previous post? The easiest way in that case is to use a retrieve action on Invoices with XPath something along the lines of the image below. This retrieves all invoices where there’s an associated payment. Is there a reason you need to use an Execute Query?


answered
0

Hi Corina,

 

Inside your loop,

 

filter the ListofInvoicePayments  list using invoice number. Use filter by expression to filter the list inside loop.

 

Expression will be : $CurrentObject/InvoiceNumber = $IteratorInvoice/DocumentNumber.

 

The above condition will give you the list of invoice payment if exists.

 

After this filter by expression, u can use decision to check whether the filtered list is empty or not

answered