Welcome to the nuBuilder Forums!

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

How can I do this one then?

Post Reply
martbarr
Posts: 60
Joined: Fri Oct 26, 2012 8:09 pm

How can I do this one then?

Unread post by martbarr »

I have a multi tab main form all based on one person record.
On some of the tabs I open subforms to manage related table data.
But the users need to see the Person's Name very clearly in big letters on all the subforms.

On the subforms there is a foreign key pointing back, but I can't find a way of displaying the related name.
#browse_filter# does it just right when I add a new record to a sub form, but that is not available except for new records.
So, I can write a cookie when the form opens holding session id and user name, but stil can't see how to display it using a display of html field.
Display field only allows SQL (aha should I write a table with one row per session ID holding the PERSON name when I open the form?)
and html cant user getElementById at that point - it errors in the console with NULL value.

So - how can I show a related field on a form when I know the owning table but can't get to the foreign key

thanks
Martin
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: How can I do this one then?

Unread post by admin »

Martin,
martbarr wrote: But the users need to see the Person's Name very clearly in big letters on all the subforms.
On all Subforms or on all Tabs?

Steven
martbarr
Posts: 60
Joined: Fri Oct 26, 2012 8:09 pm

Re: How can I do this one then?

Unread post by martbarr »

'Each tab would be best If poss - i could do it on each Sub Form by quering My Primary table (except i have nested Subforms 4 deep)
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: How can I do this one then?

Unread post by admin »

Martin,

You can use a Display Object to refer back to someone's name with sql like this..

Code: Select all


SELECT con_name FROM contact
INNER JOIN class_contact_link ON contact_id = ccl_contact_id
WHERE class_contact_link_id = '#id#'

Steven
Post Reply