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.

Hide toolbar on startup based on privilege set for all layouts

Featured Replies

 Iam certainly not a professional filemaker developer but try to work around problems (problems for me not for the pros) but this easy thing here drives me nuts. I am trying to hide the toolbar for all layouts (about 80) based on privilege set. I have placed an opening script in the File Options but what it does, it only hides the toolbar for the first/opeing layout not for the rest. Any tipps here are most welcome. Merry x- mas for all 

 

Opening script

Allow User Abort [Off]

Set Error Capture [On]

Perform Script [“hide toolbar test”] -script supposed to hide tool bars for all layouts (If [Get ( AccountPrivilegeSetName ) ="Operations"Show/Hide Toolbars [Lock; Hide] Else Show/Hide Toolbars [show] End If

#---------File Opens on L000_Opening Window to speed up the open process. #-------------by not loading any screens and images and then performs this Startup Script #

Freeze Window # #--------------------------------------Checks Staff Account for UserName #

Go to Layout [“L131_STAFF_List_View” (T17_STAFF)]

Enter Find Mode [ ]

Set Field [T17_STAFF::FileMaker_Account; Get(AccountName)]

Perform Find [ ] # If [Get(FoundCount) = 1] Set Variable [$$Name; Value:Get(AccountName)]

Set Variable [$$CalendarFilter; Value:Get(AccountName)]

Else Set Variable [$$Name; Value:Get(UserName)]

Set Variable [$$CalendarFilter; Value:"-All Users-"]

End If Show All Records Go to Layout [“L0_Opening Window” (T14_PREFERENCES)]

Set Field [T14_PREFERENCES::g_Name; $$Name]

#-------------------------------------- Set initial Session Globals for Invoice Line Item Management

Set Field [T12_INVOICES::g_Search; ""]

Set Field [T12_INVOICES::g_Product Category Filter Popover; "Product"]

Freeze Window # #--------------------------------------If the PatternCount = "Pro" - Desktop #

If [PatternCount ( Get ( ApplicationVersion ) ; "Pro" ) = 1]

Set Variable [$$Device_Mode; Value:"Pro"]

Go to Layout [“L1_Home” (T14_PREFERENCES)]

Adjust Window [Resize to Fit]

Move/Resize Window [ Current Window; Top:(Get ( WindowDesktopHeight ) / 4) - (Get ( WindowContentHeight )/4); Left: (Get ( WindowDesktopWidth ) / 2) - (Get ( WindowContentWidth ) / 2)] Perform Script [“ (0831) Map Start Up”]

# End If # #--------------------------------------Sets the window title as the name of the file.

If [Get ( AccountPrivilegeSetName ) = "Operations"]
    Show/Hide Toolbars [Lock; Hide] 
Else 
    Show/Hide Toolbars [Show] 
End If

Should do it.

 

It's not clear what happens later on in your script. IE what is the script "(0831) Map Start Up" actually doing?

 

(Next time try to display your script as in the script editor)

Of course, when you have FM Pro Advanced, you could activate the script debugger and detect which script step shows the toolbar...

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.