Page 1 of 1

How can I do this one then?

Posted: Sat Nov 10, 2012 6:00 pm
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

Re: How can I do this one then?

Posted: Sun Nov 11, 2012 11:25 pm
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

Re: How can I do this one then?

Posted: Mon Nov 12, 2012 11:12 pm
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)

Re: How can I do this one then?

Posted: Tue Nov 13, 2012 12:37 am
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