Skip 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.

Display number of records for each category

Featured Replies

  • Newbies

Hi,

I am new with FM. Can anyone help me with this problem?

I have a field that is basically a list of categories. Each record belongs to

one of the categories. I have a button for each category. When the users click

on a button, it finds and shows all the records for that category. Now the

problem is for some categories there are no records. It is very annoying for the

users when they click a button and get "no found records" message. I want to

display the number of records for each category next to the button for that

category so that the users don't have to go in if the number of records is 0.

Does anyone have any ideas on how to do this? I guess I might have to use self-join portal, but could not figure out the best way to do it.

Thank you in advance.

Well,

Count(your relationship::record_Id) should give you the current records for each category.

According to your structure, you may need either :

- a self-relationship category::category

- a set of relationship g_category1::category, g_category2::category2, where the g_category is a global field populated with the category "content".

Then, Count(your relationship::Record_ID) should give you the current count of each category.

Attached to a button, your script could look like

If (Is Valid(your relationship)

Go to related records (show only)

Else

Show message (there are no match)

  • Author
  • Newbies

Thank you, Ugo.

It worked very well.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.