Display field 2 relations deep

Tables: Company, pLocation, Person
Company is related to pLocation by companyID
pLocation is related to Person by personID

When on a Company record, I want to view a list of people - in a tab panel - related to that company location. So basically I need to use a Company to pLocation by companyID.pLocation to Person by personID in order to display the person’s name etc.

I am just getting started with Servoy and know Bob mentioned this was possible when I took the class at FMP DevCon but since it has been a while I do not remember how to do it.

I searched the forum and found a post that was similar to what I am doing, but I do not understand how to implement it.

Help?!

Hi,

Check out this link which should explain things

http://forum.servoy.com/viewtopic.php?t … manytomany

Cheers
Harry

Thanks Harry.

I tried that and must be doing something wrong. I have a form for company (which displayed basic company information like address, and another form based on pLocation that has fields showing person first and last name based on pLocation to person on personID. Nothing shows up and I know there are related records. I am showing the pLocation form through a tab panel on the company form.

Is there some checkbox or something I need to hit? I am sure I am making this much more difficult than it should. Hard to think Servoy after so many FileMaker and PHP years. :-)

My bad. Apparently my keys were messed up from the data migration. Thanks Harry.

Glad that you got it sorted.

We must have albrit fleetingly at that class at DevCon.

I dropped in for the second day when we had that group photograph taken !?

Harry…

I was there for the pic. Somewhere around left-center. :-) Sat back-center for the class.

ApeWare:
I was there for the pic.

Mr. Apeware, thanks for the help with php. :D

Hopefully, there will be a professional photographer at Servoy World 2005… 8)

Now come on, Jody

I bought you those drinks specifically because I look 10 years younger in that photo !

Don’t hang up your lightmeter now !

Cheers
Harry

Gee Harry, I was under the impression those drinks were an informal toast to further ingratiate our friendship!

You are a photogenic subject. Besides, I too was present in the photograph. I wont take the credit; the digital camera did all the work. Next time you press the timer button and I assure you the picture will turn out as well.

I can’t lay hands on the thread, but someone on this forum pointed out something that may be helpful to you, too.

In text on a form, and also in methods, you can refer to fields more than one relation away, by stringing together the relation names.

F’rinstance: ‘company_to_plocation.plocation_to_person.first_name’

Maybe you already knew this, but I know it wasn’t obvious to me at first, and sure saved a lot of aggravation when someone pointed it out for me. Hope it helps!

Actually, I saw a reference to that but couldn’t get it to work. Perhaps my relations were not compatible with each other to enable showing the data I was TRYING to display.

Thanks for the clarification on this and I will likely try this in the future.

For now it was a data issue. It WAS displaying what it should - I had an issue when i migrated my data. Garbage in…

Actually, I saw a reference to that but couldn’t get it to work. Perhaps my relations were not compatible with each other to enable showing the data I was TRYING to display.

Thanks for the clarification on this and I will likely try this in the future.

For now it was a data issue. It WAS displaying what it should - I had an issue when i migrated my data. Garbage in…