dbTalk Databases Forums  

Relationships

comp.databases.filemaker comp.databases.filemaker


Discuss Relationships in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TKnTexas
 
Posts: n/a

Default Relationships - 03-22-2007 , 07:17 PM






Using version 8 Advanced on Mac OSX (10.4.9) and WinXP Pro. I have a
file that is from ADP. I figured the ADP filenumber field would be a
good key since it is unique. In my STAFF file, I want a portal that
displays subordinates.

I have a field called supervisor. My thought is to create a self-
relationship between Filenumber and Supervisor, I called the occurence
Super2Staff. On the Supervisor field I have a drop down to display
the names (2nd field) inserting the Filenumber. I have a field next
to it to show the last name (through the relationship) of the
supervisor. I don't get that, I get the employees name.

When I go to the portal I get the subordinate's name twice. I am so
confused.


Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Relationships - 03-23-2007 , 01:03 PM








On 03/22/2007 21:17:31 "TKnTexas" <tkntexas55 (AT) aol (DOT) com> wrote:

Quote:
Using version 8 Advanced on Mac OSX (10.4.9) and WinXP Pro. I have a file
that is from ADP. I figured the ADP filenumber field would be a good key
since it is unique. In my STAFF file, I want a portal that displays
subordinates.

I have a field called supervisor. My thought is to create a self-
relationship between Filenumber and Supervisor, I called the occurence
Super2Staff. On the Supervisor field I have a drop down to display the
names (2nd field) inserting the Filenumber. I have a field next to it to
show the last name (through the relationship) of the supervisor. I don't
get that, I get the employees name.

When I go to the portal I get the subordinate's name twice. I am so
confused.
So am I. I can't quite figure out what you're getting at.

Could you describe the table structure and which fields in what tables are related?

Matt




Reply With Quote
  #3  
Old   
TKnTexas
 
Posts: n/a

Default Re: Relationships - 03-24-2007 , 04:43 PM



I have an employee table.. some of the employees are supervisors to
but I don't want a separate supervisors table. I have the typical
basic fields:
First Name
Last Name
Location
State
FileNumber (the ADP unique field for this employee)
Home Department (last 3 digits of this is the cost center)

These fields are updated from a ADP download.

I have added a field for Supervisor. When I go to my record as the
Employee TK, in the field for Supervisor I would select the FileNumber
of my Supervisor. When I go to my supervisor's record I can look in
the tab for the Subordinates and see in a portal those employees that
have her FileNumber. I just can't get this work. I have 2nd
Occurrence of the Staffing Table.

I have relation going from Supervisor field in Staff to Filenumber in
Super2Staff (the 2nd occurence). I do not want to be able to add or
delete via the relationship.


Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: Relationships - 03-25-2007 , 09:14 AM





On 03/24/2007 18:43:31 "TKnTexas" <tkntexas55 (AT) aol (DOT) com> wrote:

Quote:
I have an employee table.. some of the employees are supervisors to but I
don't want a separate supervisors table. I have the typical basic fields:
First Name Last Name Location State FileNumber (the ADP unique field for
this employee) Home Department (last 3 digits of this is the cost center)

These fields are updated from a ADP download.

I have added a field for Supervisor. When I go to my record as the
Employee TK, in the field for Supervisor I would select the FileNumber of
my Supervisor. When I go to my supervisor's record I can look in the tab
for the Subordinates and see in a portal those employees that have her
FileNumber. I just can't get this work. I have 2nd Occurrence of the
Staffing Table.

I have relation going from Supervisor field in Staff to Filenumber in
Super2Staff (the 2nd occurence). I do not want to be able to add or
delete via the relationship.
You're headed in the right direction, but lack one concept.

It sounds to me like you're trying to do this from only one layout. The problem is that a layout can be defined as being from only one Table Occurrence; in a self-join situtation like this, you need a layout for each TO.

You already have an Employees layout, displaying (I imagine) records from the Employees TO, with a related entry from the Super2Staff relationship identifying each employee's supervisor.

Task: Set up a Supervisors layout displaying records from the Super2Staff TO, with a portal displaying the names of that supervisor's employees from the Employees TO.

On the Employees layout, set the Supervisor's ID as a button to Go To Related Record from the Super2Staff relationship using the Supervisors layout, and you should see what I think you're saying you want. Do the same on the Supervisors layout, going to the employee from the Employees TO.

I created a sample file to lay this out for myself. I can provide a copy, if you like.

Matt






Reply With Quote
  #5  
Old   
Paul Bruneau
 
Posts: n/a

Default Re: Relationships - 03-26-2007 , 08:37 AM



On Mar 24, 6:43 pm, "TKnTexas" <tkntexa... (AT) aol (DOT) com> wrote:
Quote:
I have an employee table.. some of the employees are supervisors to
but I don't want a separate supervisors table. I have the typical
basic fields:
First Name
Last Name
Location
State
FileNumber (the ADP unique field for this employee)
Home Department (last 3 digits of this is the cost center)

These fields are updated from a ADP download.
I have a piece of advice for you. Do NOT use ADP's number as the key.

If you have temporary employees, or an employee who, for some reason,
leaves and then returns, ADP will give them a new number, whereas in
your system (if you are like me) you want to keep the same employee
record for someone who happens to take a leave of absence for a couple
months.

So you can still have the ADP number as a field of course, but use
your own private ID for your keys.



Reply With Quote
  #6  
Old   
TKnTexas
 
Posts: n/a

Default Re: Relationships - 03-26-2007 , 10:24 PM



The problem with NOT using the ADP is that I am not adding employees.
I am taking the downloaded file and updating my file. I can see the
problem you mention.. but I think it will be minimal. On the ADP
filenumber I can use it to update or add employees. The only fields I
am interested in is the name fields, home department. The only
purpose I have is to answer the question .. where is the employee? in
terms of locations.

As I was writing this, I thought back to my payroll days. We only
used a new filenumber when the rehire was more than a year after
departure. Otherwise we reactivated the employee.

TK

On Mar 26, 8:37 am, "Paul Bruneau" <p... (AT) ethicalpaul (DOT) com> wrote:
Quote:
On Mar 24, 6:43 pm, "TKnTexas" <tkntexa... (AT) aol (DOT) com> wrote:

I have an employee table.. some of the employees are supervisors to
but I don't want a separate supervisors table. I have the typical
basic fields:
First Name
Last Name
Location
State
FileNumber (the ADP unique field for this employee)
Home Department (last 3 digits of this is the cost center)

These fields are updated from a ADP download.

I have a piece of advice for you. Do NOT use ADP's number as the key.

If you have temporary employees, or an employee who, for some reason,
leaves and then returns, ADP will give them a new number, whereas in
your system (if you are like me) you want to keep the same employee
record for someone who happens to take a leave of absence for a couple
months.

So you can still have the ADP number as a field of course, but use
your own private ID for your keys.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.