Page 1 of 1

Subform

Posted: Fri May 04, 2018 4:22 pm
by marcvander
Hey,

i'm migrating all my forms and objects from v3 to v4. The subform logic has kind of changed from v3 to v4 and I cannot make it work anymore.

I have companies in a table called "entreprise" with "entreprise_id" as the primary key. I have contact in a table called "contact" with "contact_id" as the primary key, and a contact can belong to a company, so it has "contact_entreprise_id" as a foreign key of "entreprise_id".

I'm trying to show all the contacts who work in a company. So when on the company form, I'm trying to show in a subform all the contacts of this company. In the v3 it worked:
Capture d’écran 2018-05-04 à 16.17.16.png
Capture d’écran 2018-05-04 à 16.21.36.png
Now I'm trying to do the same in v4. First the subform object:
Capture d’écran 2018-05-04 à 16.13.41.png
Capture d’écran 2018-05-04 à 16.13.49.png
Then the form itself which will be displayed as the subform:
Capture d’écran 2018-05-04 à 16.14.00.png
Capture d’écran 2018-05-04 à 16.14.05.png
And the error I get when accessing the company form:
Capture d’écran 2018-05-04 à 16.14.23.png
Any idea on how to do it?

Re: Subform

Posted: Sat May 05, 2018 1:01 am
by admin
marcvander,

You are right, 3 and 4 work differently - especially when it comes to Subforms.

The simplest way I can think of explaining the differences is...

In version 4 a Subform...
- Is created from a Form - (so things like the SQL and the Primary Key, are defined automatically by choosing a predefined Form).
- Can only be based on a single table (not a query with joins). - Although you could use a View.

I hope that helps.

Steven

Re: Subform

Posted: Sat May 05, 2018 7:58 am
by toms
There's another thread with this "Uncaught TypeError: Cannot read property 'id' of undefined" issue.

A user came up with this solution:
https://forums.nubuilder.cloud/viewtopic. ... =10#p16458

Re: Subform

Posted: Tue May 08, 2018 12:14 am
by admin
It should all be fixed now.

Please get the latest from Github and let me know.

Steven

Re: Subform

Posted: Wed May 09, 2018 7:27 pm
by marcvander
Solved :)

Re: Subform

Posted: Thu May 10, 2018 12:10 am
by admin
.