Page 1 of 1

Foreign key not shown in dropdown when creating subform

Posted: Tue Mar 04, 2014 11:16 am
by nuGent
I have attached a screenshot of the subform wizard attempting to make a subform (invoices) to show on the parent form (customer). The problem seems to be that the foreign key dropdown only contains null and a blank entry. Even if I choose 'null' and then correct the foreign key and the SQL in the object editor, the subform linking does not work. I thought it might be my own tables but then I tried it with site_b.sql tables and got the same result.

I am almost out of time on this evaluation stage so any help to get me back on track would be most welcome. The product looks very promising but a low hurdle is tripping me up.

Regards
John

Re: Foreign key not shown in dropdown when creating subform

Posted: Tue Mar 04, 2014 7:57 pm
by Fike
Hi,

If you are in a hurry, you can create the subform (leaving the blank entry of the foreing key) and after that yoy have to correct the foreign key manually.

You just have to open the object created by the wizard and manually insert/replace the name of the field that contains the foreign key.
subform.png

Hope this helps.

Kind regards,

Fike

Re: Foreign key not shown in dropdown when creating subform

Posted: Tue Mar 04, 2014 9:07 pm
by nuGent
Thanks, I did mention that workaround but it still didn't work. However, what I didn't notice was that I should have deleted the single quotes around the 'foreign key field' in the default SQL statement (obviously!) so it is now working ok and I feel empowered enough to celebrate by making a brew. Rule number 2: always look for something simple.

Now perhaps I can get this thing off the gound...

Re: Foreign key not shown in dropdown when creating subform

Posted: Wed Mar 05, 2014 12:23 am
by admin
nuGent,

This will be fixed in the next build.
(by running nuinstall.php)

Steven