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.

calculation with filter

Featured Replies

I have an application called "MEMBERSHIP":

 

It has these fields:

PKMEMID

MemberLast

MemberFirst

Mem_Can   (Holds "Member" or "Candidate" as appropriate)

ActiveInactive  (Holds "Active" or "Inactive" depending on the member status.

 

I want to create Membership::gcMemberActiveSummary that is Global , caluclated field that holds the COUNT of  (Mem_Can="Member" and ActiveInactive="Active")

 

I have tried:

 

gcMEMBERActiveSummary=count(Evaluate(ActiveInactive="Active" and Mem_Can="Member"))

 

I suspect I have to create a layout, add the necessary fields.... filter the necessary fields and and then script a 'count' of the displayed fields then set the global field to that value?????  Or, does FM have an easier way?

 

 

I think I would skip the relationships and use ExecuteSQL() as:

 

ExecuteSQL (
"SELECT COUNT (*)
FROM membership
WHERE MemCan = 'Member' and ActiveInactive = 'Active'" ;
"" ; "" 
)

BTW, if you expect a global calculation to update then you will be in for a surprise.

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.