Joined columns don't appear on edit form

Joined columns don't appear on edit form

Postby gib » Mon Sep 12, 2016 7:39 am

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
gib
 
Posts: 11
Joined: Fri Aug 19, 2016 4:58 am

Re: Joined columns don't appear on edit form

Postby admin » Tue Sep 27, 2016 11:13 am

gib,

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

Steven
admin
Site Admin
 
Posts: 3348
Joined: Mon Jun 15, 2009 9:53 am

Re: Joined columns don't appear on edit form

Postby gib » Thu Oct 06, 2016 1:33 am

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
gib
 
Posts: 11
Joined: Fri Aug 19, 2016 4:58 am

Re: Joined columns don't appear on edit form

Postby mobilemcclintic » Sun Nov 13, 2016 5:59 am

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?
mobilemcclintic
 
Posts: 54
Joined: Fri Oct 23, 2015 8:04 am

Re: Joined columns don't appear on edit form

Postby admin » Tue Nov 15, 2016 1:29 pm

mobilemcclintic,

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

http://wiki.nubuilder.net/nubuilderv3/index.php/Adding_Objects#Display_Tab

Steven
admin
Site Admin
 
Posts: 3348
Joined: Mon Jun 15, 2009 9:53 am

Re: Joined columns don't appear on edit form

Postby gib » Thu Nov 17, 2016 7:45 am

Yes, indeed. Thanks.
gib
 
Posts: 11
Joined: Fri Aug 19, 2016 4:58 am


Return to General