June 11, 200619 yr 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?
June 11, 200619 yr Author I should clarify that "itemQty" and "minimumAllowed" are both numeric fields in this table.
June 12, 200619 yr 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).
June 12, 200619 yr Author 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.
June 12, 200619 yr 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.
Create an account or sign in to comment