Jump to content

Related roles


This topic is 8454 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello,

I have a db Personnel that has straightforward contact info. Another db Contracts has fields for, say, Manager, Foreman, Straw Boss and Paymaster. What I would like to do is create some relationships so that when the user enters a Foreman's name in Contracts, if it matches a name in personnel, related fields display the appropriate contact info.

At this point, entries in Personnel are "equal" in that they are not flagged with roles Manager, Foreman etc. The reason for this is that the individuals could be Manager on one contract and Paymaster on another.

I have lots of other relationships not needing any couples therapy but this one has me stumped for a design.

Thanks to whosoever tackles this.

Bill

Link to comment
Share on other sites

In your Personnel file, have a field "Personnel ID", an auto-entered, unique servial number. In Contacts, have fields for Forman ID, Manager ID, Straw Boss ID, and Paymaster ID. Fill these in with the ID's of the appropriate personnel (could be a pulldown with both ID and name from the Personnel file). Build a separate relationship for each of these categories (foreman, manager, etc.) matching (for example) Foreman ID <--> Personnel ID. Use these relationships to display information from the Personnel file in the Contacts file.

-bd

Link to comment
Share on other sites

Thanks for your response. What you say is

very useful.

My quandry is how to have the related personnel fields show just the information for that relationship. I got something going

but if one relationship had a good match, every : :personnel_phone field on the page showed the same phone number. So How can I have a matching Foreman: :personnel show only the matching : :phone while on the same page have a matching Manager field force another : :personnel_phone field show the correct phone for THAT relationship. I tried forcing this by having the related fields appear in portals but they still shared the same phone number even though it was valid for only the Manager.

Thanks for your patience,

Bill

[ March 23, 2001: Message edited by: LiveOak ]

Link to comment
Share on other sites

You're doing something wrong. If you have separate relationships from Contracts to Personnel for:

1) Foreman, call it ForeRel, ForemanID <--> PersonnelID

2) Manager, call it ManRel, ManagerID <--> PersonnelID

3) Straw Boss, call it Straw Rel, StrawBossID <--> PersonnelID

4) Paymaster, call it PayRel, PaymasterID <--> PersonnelID

For the Foreman's information in Contracts:

enter ForemanID and display

ForeRel::Name

ForeRel::Phone

For the Manager's information in Contracts:

enter ManagerID and display

ManRel::Name

ManREl::Phone

etc.

If this doesn't clear up the confusion, I'll create two example files and send them to you.

-bd

Link to comment
Share on other sites

I set up fields and relationships as per our discussion and the

relationships work except for the creation of related records. I have the

option to do so checked where needed and all fields are of the type text.

My master file key is "Managerfirstpluslast", which concats the managers'

first and last names. In the related file(personnel) the key is "personnelfirstpluslast" which concats personnel's first and last names.I have other files related where merely typing the letter A in

a ::related field creates a new related record. I am getting the dialog

warning for manager/personnel stating the relationship is not valid when

I try to enter a : tongue.gif" border="0hone number in the master file. When I enter a first and last name for manager, that doesn't start a related record; though they remain as entered but do not appear in a new related record.

Link to comment
Share on other sites

This topic is 8454 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.