Struggling with subform with no success
Posted: Sun Apr 04, 2021 5:57 am
Hi, I can't manage to figure out how to make a subform in a very simple situations; tried to match some online tutorials but can't make it work.
I have a very simple customer/orders situation: an "edit" form for a single customer, and I would like to browse orders from that customer. Of course, orders.customer_id is a foreign key to customer.id
What I did:
* have an "edit" form for the customer;
* put a "subform" object at the relevant location in the previous "edit" form (in the "subform" tab of this objects, I set the following form in the Form field and put customer_id in the Foreign key field despite the fact that no table can be referred to here)
* have a "browse" form for the orders with as SQL
But I see nothing; actually, I see the subform object but empty (empty means that I don't even see empty columns for the browse form).
After browsing a little here, I noticed the recent question: https://forums.nubuilder.cloud/viewtopic.php?f=19&t=10925
which tells about a "Run" object rather than a "Subform" one, but I thought that the Subform was exactly for what I need. Why doesn't it work on such a simple case?
I have a very simple customer/orders situation: an "edit" form for a single customer, and I would like to browse orders from that customer. Of course, orders.customer_id is a foreign key to customer.id
What I did:
* have an "edit" form for the customer;
* put a "subform" object at the relevant location in the previous "edit" form (in the "subform" tab of this objects, I set the following form in the Form field and put customer_id in the Foreign key field despite the fact that no table can be referred to here)
* have a "browse" form for the orders with
Code: Select all
select * from orders where customer_id = #ID#
But I see nothing; actually, I see the subform object but empty (empty means that I don't even see empty columns for the browse form).
After browsing a little here, I noticed the recent question: https://forums.nubuilder.cloud/viewtopic.php?f=19&t=10925
which tells about a "Run" object rather than a "Subform" one, but I thought that the Subform was exactly for what I need. Why doesn't it work on such a simple case?