2 Replies Latest reply on Feb 22, 2011 10:39 AM by yuichim

    Manager override function?



      Manager override function?


      Does anyone has any experience on creating a manager override function?

      For example, I have a company directory listing and when a user clicks on the list, I wanted to open a popup window that asks for a manager privilege and then proceed on layout change.    How is everyone doing this?

        • 1. Re: Manager override function?

          Before I spell that out, it's also possible to have the button do nothing or pop up a message that "you don't have permission to do this..." if a user whose privilege set does not permit them to do this.

          For what you have specified, you can use Show Custom Dialog to pop up the message with an input field linked to a global text field and with the password option so that the manager code is not visible when typed in.

          Then your script can verify the manager code and proceed to the layout if it is valid. How you validate the manager entered code depends on how you choose to set this up.

          You can "hardwire" it to a single code:

          Show Custom Dialog ["Enter manager code"]
          If [YourTable::gManagerCode = "xyz"]
             Go To Layout [//specify your layout here]
             Show custom dialog ["Invalid manager code"]
          End If

          You can look up a manager code from a table, if it's not there, present the error message.

          Show Custom Dialog ["Enter manager code"]
          If [ Not IsEmpty(Managers::ManagerCode) ]
              Go To Layout [//controlled layout]
              Show custom Dialog ["Invalid manager code"]
          End If

          This second script requires a relationship:

          YourTable::gManagerCode = managers::ManagerCode

          But now you can have multiple manager approvals, can track which manager gave approval and you can update manager codes any time you need to by editing records in the Mangers table.

          • 2. Re: Manager override function?

            Thank you Phil!

            I ended up going with your first solution. Laughing