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.

Hiding buttons

Featured Replies

I would like to make a button appear if the current count of records in a portal is more than 1, disappear if 1 or zero. In FMP6 I used the trick of a one record portal that displayed that record if the relationship was satisfied. That solution always felt quite clutzy, but it worked.

In FMP9 I can hide the button under certain conditions by making the text and fill of the button match the background. However the button will still flash when that area is clicked. So this solution isn't ideal.

Is there a better way?

In a related issue, I've worked out a way to obtain the displayed count of a portal. It works, but it also feels clutzy. Is there a better way.

Here's the clutzy way (that works). Add a Constant to the table displayed in the portal, in this case the Addresses table. In the table of the layout at hand (in this case People) add a calc which takes the sum of that Constant. The context of the calc is People and calculation itself is Sum (portalRelationshipName::Constant).

A rather convoluted way of doing this. I'd like to learn how to do this properly.

Much appreciated.

The portal method is still a good option...probably the best with the current feature set.

Other options:

1. Alternate layouts.

2. Multiple Tabs, with various buttons.

A simple way to count related records is:

Count ( RelatedTable::Matchfield )

  • Author

Am mildly started that the one record portal is still the way to go when hiding objects. And thanks for the Count(portalRelationship::matchfield). Much simpler, and it works.

Much appreciation to both of you.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.