Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Joined columns don't appear on edit form

Post Reply
gib
Posts: 11
Joined: Thu Aug 18, 2016 9:28 pm

Joined columns don't appear on edit form

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

Re: Joined columns don't appear on edit form

Unread post by admin »

gib,

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

Steven
gib
Posts: 11
Joined: Thu Aug 18, 2016 9:28 pm

Re: Joined columns don't appear on edit form

Unread post 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
mobilemcclintic
Posts: 54
Joined: Fri Oct 23, 2015 12:34 am

Re: Joined columns don't appear on edit form

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

Re: Joined columns don't appear on edit form

Unread post by admin »

mobilemcclintic,

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

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

Steven
gib
Posts: 11
Joined: Thu Aug 18, 2016 9:28 pm

Re: Joined columns don't appear on edit form

Unread post by gib »

Yes, indeed. Thanks.
Post Reply