Page 1 of 1

Joined columns don't appear on edit form

Posted: Mon Sep 12, 2016 12:09 am
by gib
Hello:

I created a form for a table joined many-to-one with another table. The one table contains organization members, and the many table contains dues payments and charges. The SQL for the form is

Code: Select all

SELECT dues.*, member.lastName, member.firstName 
FROM dues, member
WHERE dues.member_fk = member.member_id
ORDER BY dues.date DESC


This works fine on the browse form, correctly displaying the last name and first name with each member dues entry. However, when I create objects on the edit form for lastName and firstName, they aren't populated. It's strange, because I've used the exact same technique to create a subform, and it worked fine.

Any advice appreciated!

Thanks,

Gib

Re: Joined columns don't appear on edit form

Posted: Tue Sep 27, 2016 3:43 am
by admin
gib,

A Form will save fields from only one table, unless you create PHP events to do more.

Steven

Re: Joined columns don't appear on edit form

Posted: Wed Oct 05, 2016 6:03 pm
by gib
Hi, Stephen:

I get that. I only want to save fields from one table, but I want to display fields from another joined table. The query in my first post works fine, and its results display correctly on the browse form. I just want the joined fields to be displayed on the edit form (as read only).

Thanks,

Gib

Re: Joined columns don't appear on edit form

Posted: Sat Nov 12, 2016 9:29 pm
by mobilemcclintic
Any reason why you can't use display fields and just have the sql code for that in the sql tab of the item properties?

Re: Joined columns don't appear on edit form

Posted: Tue Nov 15, 2016 4:59 am
by admin
mobilemcclintic,

Use a Display Object (that's what its for)

http://wiki.nubuilder.net/nubuilderv3/i ... isplay_Tab

Steven

Re: Joined columns don't appear on edit form

Posted: Wed Nov 16, 2016 11:15 pm
by gib
Yes, indeed. Thanks.