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.

Get Active Tab Control?

Featured Replies

I am trying to customize a script to perform differently based on which tab control on the layout is currently active. Any ideas?

Well, you could hard code a test against each tab panel in your control:

GetLayoutObjectAttribute("YourTabObjectNameHere";"isFrontTabPanel")

The quotes are required.

Edited by Guest

  • Author

Perfect. Thanks! Didn't even think to assign object names to the tabs themselves. Good tip!

Object naming'll come in handy when you need to navigate to specific tab panels as well, using Go To Object[] :)

  • 1 month later...

I've just started working with Tab Control and found this thread, so I will add my question to it because it's similar to my issue. I created an unstored calc called cActiveTab:

If (

GetLayoutObjectAttribute ( "TabOne" ; "isFrontTabPanel" ) ;

"TabOneActive" ;

"TabOneNotActive"

)

It doesn't get any simpler than that. However, when I click on the tabs in my layout, the result of the calc does not change. The tab layout object is definitely named correctly. What am I doing wrong?

Many thanks for your suggestions--

Make sure you actually check "Do Not Store..." in Storage Options. For whatever reason, "none" is not enough.

Also make sure you have "Do not evaluate if all referenced fields are empty" UNchecked.

Thanks for your reply, Colin. Those boxes are already checked.

FWIW, if I click into the calc field on the layout, it instantly updates and shows the correct active tab. But only if I click into it.

:)

FileMaker's app window doesn't refresh as a result of selecting a tab panel. Play with the Records...Refresh Window menu item and you'll see what I mean.

Are you using this as some kind of presentation layer interface element?

This calc field will not be used in the presentation layer, I'm using it for development purposes only. I suppose I could just use the Data Viewer instead, but sometimes I like to place certain 'helper fields' right there on the layout as I program so I can easily monitor the status of certain operations. Not a big deal, I can certainly work around it.

Thanks for your replies, Colin.

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.