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

filter + self-join + portal = confused


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

Recommended Posts

Posted

Hi

I'm trying to display in a portal, a subset of a table's records, based on a calculation.

pseudo code: if itemQty is =< minimumAllowed, then display that record in the portal.

What is a simple way to do this?

Posted

You need to create a calculation key field in the child to only have a value when your condition is true. It could match a "constant" in the parent, or it could produce the portal's main key itself. Examples:

Case ( itemQty <= minimumAllowed; 1 )

That would match a Constant, = 1 field in the parent, which you'd add to the portal's relationship.

Case ( itemQty <= minimumAllowed; key field )

That would match the portal's parent key field itself (which you haven't told us, hence I can only do generic).

Posted

Thanks Fenton.

What is confusing me is the self-join nature of the relationship. I want the portal to contain the same (low_qty) items (from the same table) regardless of which record I'm viewing.

Also, I'm a bit thrown-off by FileMaker's recent change in portals referencing related tables rather than the relationship itself, as they used to. It's been a couple years since I used Filemaker (v5). I'm pretty slow about these things. I'll catch on eventually.

Posted

If you want to always see the same thing, then use a "constant" calculation field on the "left" side, and the calculation that produces a 1 on the other. As long as there's >0 found set, the relationship will be the same (relationships don't work when there's a zero found set). Whether it's a self-relationship or not makes little difference.

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