Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Portal Filtering - Using calculations to filter

Featured Replies

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

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
  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.