Jump to content

This topic is 3041 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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
Posted

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

Posted

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

 

Posted
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.

This topic is 3041 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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