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.

Triggering a script when opening window

Featured Replies

Hi all

I'm using file maker 13 and trying to create a data base for multiple users on the web with a privilege set. and it would also be controlled by two people with full access privilege.

one of the requirement is to set a lay out for the members where the would be able to submit requests to the full access privilege people. and a message should pop-up on the Admin (full access) start-up window when a new query is submitted, also a message should pop-up on the member's who submitted the query  start-up window when  the request is answered.

I wrote a script that obviously didn't work, it looks so complicated to me, 

set Error Capture [on]

 If [Get (AccountPrivilegeSetName) = "[Full Access]"]

 Go to layout ["Query"(Query)]

 Enter find mode

 Set Field [Query::query_status; "Active" ]

 perform find

   if [Get (LastError) = 0]

   go to layout ["Home"(members)]

   show custom dialog [" New Queries" ; "You have" & Get ( FoundCount ) & "queries"]

   perform script ["find active queries"]

     Else If [Get (LastError) + 0]

     go to layout ["Home"(members)]

     show custom dialog [" New Queries" ; "You don't have active queries"]

     End If

End If

set Error Capture [off]

set Error Capture [on]

If [Get (AccounName) = Query::email_query]

go to layout ["query"(query)]

Enter find mode

Set Field [Query::email_query;Get( AccountName )]

Set Field [Query::status_query; "Answered"]

 show custom dialog ["Queries" ; "Your request was answered"]

Go to layout ["Home"(members)]

Enter find mode

Set Field [Home::email_address;Get( AccountName )]

perform find

enter browse mode

If [Get (LastError) + 0]

Go to layout ["Home"(members)]

Enter Find Mode

Set Field [Home::email_address;Get( AccountName )]

perform find

enter browse mode

End If

End If

set Error Capture [off]

Exit Script

 

I would really appreciate any help or  suggestion if you were able to find what's wrong

   

 

Edited by Lee Smith
Removed the Red out of the post and used the Code Tool

Rather than scripting a Find, have you considered putting a portal on the Home layout that shows the user's related queries?

  • Author

Hi Fitch,

Will the members be able to submit more than one query if I did that?

and how can I make filemaker identify if the account name is a full access privilege member or a regular member and pop-up a custom box accordingly.

Thanks

 

22 hours ago, uthealth said:

Will the members be able to submit more than one query if I did that?

Why wouldn't they? I thought we were just talking about displaying the queries.

 

Quote

and how can I make filemaker identify if the account name is a full access privilege member or a regular member and pop-up a custom box accordingly.

Well, the script you posted already shows you two different ways to test for access privileges. And if you display the queries in a portal, there's be no need for a dialog. Unless your users love dialogs.

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.