Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Omit current record from self relate portal


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

Recommended Posts

Posted

He all,

I've tried everything I can think of without success, so I'd like to ask if anyone else has been able to do this.

I have a file of items, sorted into various categories. When viewing an item, I have a self-relationship which allows me to see all items in the same category via a portal. I want that portal to NOT include the parent item, as it is just duplication.

Possible? Any help appreciated.

Cheers,

Sean.

Posted

Actually there might be plenty ways for achieving it using scripts, but I'll propose you an only calc method.

So, what you need is:

An unique serial number (use text format for ex ID0001, it will be clearer later why using literal prefix), name it ID

The self relationship you already have.

An value list "relIDS" based on this self rel and using values from field ID (from self relationship)

An calc field ( don't have to be stored) name it meExcluded

Substitute(ValueListItems(Status(CurrentFileName), "relIDS"), ID, "")

(now you can see why prefix in ID)

And finally, the relationship that you'll use at place of the self relationship

selfWithoutMe::meExcluded-->ID.

HTH

Dj

I can mail you the file if you need it

Posted

Djukic,

Thank you so much. I'm ashamed now to call myself a developer, given the time I spent on this.

I thought I was on the right track with the Value list items, but couldn't quite get it.

Your idea works perfectly, and you are right I wanted to avoid using scripts, as this is primarily a web based solution. Apart from the lack of elegance...

I only have one question. Have you specified the ID prefix because its necessary? I cant see how it is. Providing the ID field is unique all should be fine. I always specify an identifier for my serial numbers in every file anyway so that I can distinguish them easily, but only because its good practice, not because its essential.

Thanks again for your help, much appreciated, and I owe you a drink.

Sean.

Posted

It's because of Substitute function that could make some mess like substituting every occurrence of some digit, hence put some literal befor the number and you'll avoid major problems.

HTH

Dj

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