Jump to content

Remove current record from portal


dovcamp
 Share

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

Recommended Posts

I have a single DB for student records.

When you bring up a specific student there is a portal that shows who that students siblings are.

To accomplish this I created a field called ID1 which is defined as:

Student Last Name & Right(Primary Home Phone,4) so that any students that share a common last name and the last 4 digits of their phone number are considered siblings.

Then I created a self relationship where ID1:ID1 and I place this in a portal. It brings up the siblings but it also lists the current record. So that the current student shows up as his/her own sibling. Is there a way to elimanate the current record from the list?

Link to comment
Share on other sites

During your navigation, set a global field to StudentID (or whatever the primary key of your record is), then create a calculation field (cFamilyID) with the following: If ( StudentID <> gStudentID, FamilyID, "" ).

You relationship then becomes FamilyID::cFamilyID, and you will show all related records apart from the current record.

Of course you have a serious problem with relating records via such a volitile data as the last name and phone numbers. As soon as one of those changes your relations all break.

I highly recommend that you use genuine IDs. See my FAQ for how to accomplish this http://www.fmforums.com/ubb/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=8&t=000018

Link to comment
Share on other sites

When I set up the field cFamilyID like:

If ( StudentID <> gStudentID, FamilyID, "" ) for some reason the result comes out to just the last 4 digits of the students phone number which is different then the FamilyID which is lastname + last 4 digits of phone number.

Any ideas?

Link to comment
Share on other sites

This topic is 7388 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
 Share

×
×
  • Create New...

Important Information

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