Jump to content

Self Join Problem


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

Recommended Posts

I'm having a problem with creating a self-join. I must be doing something wrong, but I can't place my finger on it. When I create the attached self-join file, and then reference the relationship, it's showing blank records where the original records have been omitted... I'm sure it's really obvious, but I think I've been looking at it too closely...

Any help would be appreciated...

Thanks,

FileMaker Version: 6

Platform: Windows XP

test.zip

Link to comment
Share on other sites

The idea of a self-join is to show information from other records that are related to the current record. I'm not sure what you are trying to do with your data; usually you have a form view with a portal to the related records.

Link to comment
Share on other sites

Without getting into a lot of detail, this is a very simplified demonstration of the problem I'm encountering. I'm trying to create a view to a subset of data. The calculation will have a value set to only show some of the records depending on criteria from the user.

The fundamental question is why is this relationship returning blank records which don't seem to meet the join criteria, and how do I eliminate it?

Hope that makes sense...

Link to comment
Share on other sites

hi mtnman,

The answer is, that they are meeting a relationship criteria or nothing would appear. Unfortunately, they just aren't meeting the one you had in mind. This is probably do to the Key you are using is too broad of criteria (i.e. using a calculation ~Constant = 1, or something), or they aren't unique enough to pull just the information that you are looking for (such as using the Customer_I.D.). You might also want to check that the Fields in the portal are not coming from a different relationship than the one established for the Portal (i.e. the Current File, instead of the Related file).

HTH

Lee

Link to comment
Share on other sites

That helped... However, I may just be trying to get to a solution, that I can't really get to this way. I was hoping a self-join would allow me to create a list type layout against the relationship directly.

So for example, if a user signs in with a "desktop" profile, they would get one list of records, while another user would sign in with a different profile and get a different set of records. I'm trying to avoid doing this based on security groups, but want to be able to simulate that sort of functionality...

Link to comment
Share on other sites

Hi mtnman,

I didn't see the attachment you had posted, sorry.

However, you make the relationship based on the word Desktop, it may do what you are asking, see the attachment.

FileMaker Version: 6

Platform: Mac OS 9

test.fp5.zip

Link to comment
Share on other sites

I don't grok Lee's response, but I think you could use scripting in conjunction with the self-join and the layout in your original post. Use a Go To Related Records script to pull up the set of records that user has access to. This will only work in situations where the user doesn't have access to perform their own finds.

FileMaker Version: Dev 6

Platform: Mac OS X Panther

Link to comment
Share on other sites

Thanks Lee,

That's sort of what I was trying to get at. Can you tell me how to do a find within the portal? If I can get that portion working, I think I'll have what I need...

Thanks for all the help...

Link to comment
Share on other sites

Hi mtnman,

I have tried to answer your last post, not this one, and I keep getting interrupted, I have my grand kids here. Anyway, I hope this makes sense to you.

I have adjusted your file again in hopes it comes closer to what you want.

The file shows how to use a popup menu with a value list, to select a criteria, and then display the records in a portal.

to select a group of records and then and then using a Script Step, as suggested by Ender, go to a particular recorded within the selected group using "Go To Related Record" (GTRR) script step,

I made a a Popup Menu of the Global field and used your field "Category" as it's contents. Use it to select your criteria, and the portal will populated with the records meeting the criteria, you can then click on the GTRR button to go to a particular record.

HTH

Lee

FileMaker Version: 6

Platform: Mac OS 9

test1.1.fp5.zip

Link to comment
Share on other sites

I really appreciate the all the help. Let me see if I can explain what I'm really trying to get to.

I'd like to create a list based on a user logging in thru a custom login screen. Then once they've logged in, I'll gather a preference that was set for them. Then when they go into a list layout, they can run a standard type find against the list.

I'm pretty new to FM, but what I'm really trying to do is get the equivalent of a view in Oracle, but I really need the user to be able to run finds against any of the fields, so the portal doesn't seem to work the way I need...

Link to comment
Share on other sites

I think I get it.

If you are using FM5.5 or FM6 you could look at the Record Level access priveleges. But I'd suggest scripting it. Just include the user's Category in the find script.

Enter Find Mode []

Set Field [ Category, Security_Link::Category ]

Pause/Resume []

Perform Find

In this case Security_Link is a relation into the current user's account prefs. There are a couple ways to do this, so if you want more info, you can look in the Security forum or the Sample Files forums.

Link to comment
Share on other sites

For the passwords that your users use, set Available menu commands to "Editing Only" in the Access Privileges-->Passwords dialog.

By doing this, you will need to create buttons and scripts for navigation, record creation, and deletion operations.

Link to comment
Share on other sites

This topic is 7296 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.