Need clarification on filters

Hello,

I am trying to do a very simple thing : show a list of order details for a subset of orders. I set up an OrderDetail form and an OrderDetail_to_OrderHeader relation including a join on order number plus a test on the status field of the order (which is a filed in the OrderHeader table).

When it shows, I still get all the OrderDetail table, except that the OrderHeader data fields I print along on each row of the list are missing for the “filtered” rows.

I tried the same thing with AddFoundsetFilterParam, with the same result.

I managed to get what I wanted through a loadRecord(appropriate SQL query) but could explain this strange standard behaviour or refer me to the proper section in the documentation, because to me, it makes no sense.

Thank you,
Francis

Hello Francis,

When it shows, I still get all the OrderDetail table, except that the OrderHeader data fields I print along on each row of the list are missing for the “filtered” rows.

So, you have a table or list view but you are missing related data?

When it shows, I still get all the OrderDetail table

Isn’t that what you want? Order details on the OrderDetail form?

except that the OrderHeader data fields I print along on each row of the list are missing for the “filtered” rows.

I guess you use the correct join?! Otherwise your own statement would give a faulty result as well right? But how do you show these data? is it a relation in a field?

A little more info would help because what you tell is too generic.
Also, what Servoy, what Java, what platform…

I am using 3.5 on OSX, but 3.1 did the same.

Now, let’s say I have :

OrderHeader : order_no customer status
Order1 Client1 INVOICED
Order2 Client2 INVOICED
Order3 Client1 DESPATCHED
Order4 Client3 ACKNOWLEDGED

OrderDetail : order_no product
Order1 Product1
Order1 Product2
Order2 Product4
Order3 Product2
Order3 Product5
Order4 Product1

Relationship OrderDetail_to_OrderHeader :
OrderDetail.order_no = OrderHeader.order_no AND status != ‘INVOICED’

I want :
Order3 Product2 Client1 DESPATCHED
Order3 Product5 Client1 DESPATCHED
Order4 Product1 Client3 ACKNOWLEDGED

I get :
Order1 Product1
Order1 Product2
Order2 Product4
Order3 Product2 Client1 DESPATCHED
Order3 Product5 Client1 DESPATCHED
Order4 Product1 Client3 ACKNOWLEDGED

I hope it is now clearer.

Cheers,
Francis

A last word : the relationship is an INNER join, that is why I am basically asking “Is it a bug or a feature ?”