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.

What tab is active?

Featured Replies

I have a tab control layout object with several tabs. I have a global field entitled "g.active tab". I want to set g.active tab to the name of the active tab of the tab control object. I hope this is clear.

For example, my tab control object has Student Teachers as tab 1 and Methods Courses as tab 2. When the Student Teachers tab is active, I want to g.active tab to hold the value "Student Teachers" (the name of the tab).

Thanks in advance... I hope this can be done!!

Phil Feldman

FileMaker Pro 8.5 introduced a function for returning all kinds of information about layout objects. The function is called GetLayoutObjectAttribute.

Assuming you have given each tab panel an object name , you can use the "isFrontTabPanel" property with this function to determine if a certain tab panelis the front panel.

Maybe you could the GetLayoutObjectAttribute function to accomplish what you are looking at.

Hi

if nobody gives you a better solution, you can try this one... ( but you'll need EventScript plugin )

ActiveTab.zip

  • Author

Thanks so much. I tried this function, but I'll try again. Nice to know I am on the right track.

Thank you.

  • 8 years later...

Hi,

For any one looking for a different solution I wrote this simple script called "Get Front Tab Panel Value", no plugins, use as standard for any number of tabs, just use Script Trigger with the help of Optional Script Parameter.

The Global Variable "$$Front_TabPanel" holds the Active Tab.

One time Script:

Set Variable [ $Loop_Count; Value:2 ]
Set Variable [ $N_Parameters; Value:GetValue(Get ( ScriptParameter );1) ]

Loop

If [ GetLayoutObjectAttribute ( GetValue( Get( ScriptParameter );$Loop_Count) ; "isFrontTabPanel" ) ]

Set Variable [ $$Front_TabPanel; Value: GetValue( Get( ScriptParameter );$Loop_Count) ]
Exit Script [ ]

End If
Exit Loop If
[ $Loop_Count $N_Parameters + 1 ]

Set Variable [ $Loop_Count; Value:$Loop_Count + 1 ]

End Loop 

 

Two Additional Steps:

1.- On Layout Mode Name each Object Tab using the inspector, (I use the same name on my Tabs).

2.- Set a Script Trigger  "OnObjectModify" to call the above script, Its very important to use the "Optional Script Parameter" like the following Example tabs:

Tab1  Tab2  Tab3  Tab4

 Optional Script Parameter loks like this:

List(4;"Tab1";"Tab2";"Tab3";"Tab4")

(First Parameter will tell Script how many tabs you have)

This way you can use the same Script for all your Tab Control Panels, just set the first "Optional Script Parameter" to the corresponding count of Tabs followed by the corresponding Tab's Names.

Hope this helps anyone;

FY

Edited by fyanesv

Since now it is 2015, I think you may want to look at the trigger

OnPanelSwitch

and its accompanying functions

Get(TriggerCurrentPanel)
Get(TriggerTargetPanel)

available as of FM12 (though with slightly different names).

Wow!, Thanks eos, missed those two functions, never mind my script.

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.