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.

Count records based on specific criteria

Featured Replies

Gents,

my Category field has: Phones, TVs and Laptops. 

I'd like to display on my layout the amout of Phones, TVs and Laptops in the current DB. 

For all I know is that I need to create three variables and use Insert Merge Field option to paste those into layout. 

How should the formula look? 

There are many ways you could accomplish this. Perhaps you could explain why and when you need this, so that we can tell which ways are better for your situation than others. Note that there is a difference between counting records in the current found set vs. counting records in the entire table. Another significant difference is between a "live" count that updates itself at all times vs.a scripted count that is produced on demand.

 

Edited by comment

  • Author
54 minutes ago, comment said:

explain why and when you need this

I need to know at glance how many specific items I have.

55 minutes ago, comment said:

counting records in the entire table

that's what I need

56 minutes ago, comment said:

a "live" count that updates itself at all times

exactly!

Here's one way you could accomplish this:

  1. Define a table of Categories and populate it with 3 records: Phone,TV and Laptop;
  2. Define a relationship between your existing table (Products?) and Categories, matching on Category;
  3. Add a calculation field to the Categories table = 
    Count ( Products::Category )
  4. Define another relationship between Products and a new occurrence of the Categories table, using the x relational operator;
  5. Place a portal to the new occurrence of the Categories table on the layout of Products; put the Category field and the calculation field inside this portal.

 

 

 

  • Author

thanks! will try it

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.