Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Subform

Questions related to using nuBuilder Forte.
Post Reply
marcvander
Posts: 101
Joined: Mon Mar 26, 2018 5:57 pm

Subform

Unread post 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?
You do not have the required permissions to view the files attached to this post.
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Subform

Unread post 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
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Subform

Unread post 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
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Subform

Unread post by admin »

It should all be fixed now.

Please get the latest from Github and let me know.

Steven
marcvander
Posts: 101
Joined: Mon Mar 26, 2018 5:57 pm

Re: Subform

Unread post by marcvander »

Solved :)
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Subform

Unread post by admin »

.
Post Reply