strange relationship behavior

Hi,

I’m trying to display data from a related table in two columns.

My two tables are “orders” & “items”, where orders.itemid = items.itemid

Each item also has a int field called columnnumber, which is either 1 or 2.

So I have two relationships to display the data in two columns, and they use calculated fields in the “orders” table called oneKey (return 1;) and twoKey(return 2;)

These two relationships are behaving extremely erratically, showing part of the related data, none of it, or the wrong data. Is there something wrong with building relationships in Servoy using calculated fields like this? If so, how should I handle this problem?
Thanks,
Andrew

What do you mean by “display the data in two columns”? How is the layout setup?

Here’s an image, where the form uses the orders table, and the two nested forms both use the items table and use the following relationships:

the one on the left:
orders.orderid = items.orderid
orders.oneKey = items.columnnumber

the one on the right:
orders.orderid = items.orderid
orders.twoKey = items.columnnumber

This should work. What happens if it “goes wrong”?