January 10, 201412 yr This question is based on mr_vodka's Basic portal Filtering topic: http://fmforums.com/forum/topic/72108-basic-portal-filtering/ I want to use the concept described here, of using a drop-down list on a layout, to cause the embedded portal to be filtered based on the user's selection. In this example, the filter options (drop-down list values) are based on a field value (Child_FMP11::Type). Because I'm going to be using this on a portal containing invoice information, the filters will be based on a numeric calculation, not a fixed field value. The calculations will be (aside from "All"); Invoice::Bal = 0 Invoice::Bal > 0 The sample file provided by mr_vodka includes the portal filter calculation: Parent::gSelect = "All" or Parent::gSelect = Child_FMP11::Type I just need some help with the second part of this calculation, to replace the "Type" field value with the 2 calculation options I mentioned above. TIA
January 10, 201412 yr IIUC, you want to replace filtering by type with filtering by balance, not add to it? If so, you could make your global field use a value list of: "All", Settled" and "Outstanding" or similar, then filter the portal using = Parent::gSelect = "All" or Parent::gSelect = "Settled" and Invoice::Bal = 0 or Parent::gSelect = "Outstanding" and Invoice::Bal > 0
January 11, 201412 yr Author Thanks comment, yes, 'replace' is correct. Thanks for the above - my first lesson in using 'or' and 'and' operators together! Shows nicely how a calculation can be associated with a value selected in a list - just what I needed. IIUC, you want to replace filtering by type with filtering by balance, not add to it? If so, you could make your global field use a value list of: "All", Settled" and "Outstanding" or similar, then filter the portal using = Parent::gSelect = "All" or Parent::gSelect = "Settled" and Invoice::Bal = 0 or Parent::gSelect = "Outstanding" and Invoice::Bal > 0
Create an account or sign in to comment