simoncpage Posted July 29, 2004 Posted July 29, 2004 2 files Contacts and Companies in the company file I have a portal showing the contacts within companies and I have a field which is an unstored calculation of: contacts::CONTACTID & "
Ugo DI LUCA Posted July 29, 2004 Posted July 29, 2004 Hi, Because Contacts::ContactID returns the first related record if not unique. Sort your relationship with some other keys (or order) and it will reflect this sort you decided. But what is your exact goal ?
simoncpage Posted July 29, 2004 Author Posted July 29, 2004 I have a file that contains details that relate of company and contact So contacts::CONTACTID & "
Ugo DI LUCA Posted July 29, 2004 Posted July 29, 2004 I don't get it. You have a portal showing Contacts in Companies. So, if someone is affiliated to 2 companies, it should show in both Companies portals, if you used a CompanyID in the Contact Table that has a Multi-line structure where IDs are separated by a Carriage return : CompanyID001
simoncpage Posted July 29, 2004 Author Posted July 29, 2004 Let me put together a demo file attachment!
simoncpage Posted July 30, 2004 Author Posted July 30, 2004 okay here it is simply you will see the 5678 in the first telephone column is always the same however if I use the calc value I get the right answer provided that there the comp ID is at the top of the list. Basically what I want to achieve is how it is in the last column regardless which company? Any ideas - I have a work around that I could use but its not ideal which involves listing the companies by last modified so as soon as a company is view it triggers a modification and the comp comes to the top and the details are shown. If you click on the trigger to make a company top it then updates the calculated ones to the correct value - but this is a bit messy and relys on always using trigger any ideas would be nice! demo.zip
Ugo DI LUCA Posted July 30, 2004 Posted July 30, 2004 Hi, If really you want this accurate, you'd better link your portal to the Join File, and have the fields you need in the portal populated (in the Join File) by lookup using either relationships ->Join:ContactID::Contact:ContactID ->Join:CompanyID::Company:CompanyID Actually, that's what the Join is for too. Then, from the join record in the portal, you'd click the row for more information on your contact, with a script of type : SetField[gContactID:PortalRel:ContactID] where gContactID is a global linked to your Contact File through another relationship 'ContactBygContactID' matching the ContactID. Then either move to the Contact file through a GoToRelated Records GTRR[ContactbygContactID-show only related ] or in a portal using the newly created relationship above. Well, the way you're trying to do it, either with 5,6 or 7 would never fit your needs, as you're involving mixed related data. The trigger trick would reveal troublesome at the end compared to several added lookup fields and a solid relationship. HTH
Recommended Posts
This topic is 7422 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now