Jump to content
  • PIN()

    VBScript

     

    This function returns the pin which is configured for the current script user to login to his SwyxPhone.

     

    Dim sPhonePIN
    sPhonePIN = PIN()

     

    This function returns a string value.

     

    If being used in a group context (from SwyxWare v13.27) this function returns an empty string. Read more about user and group context differences here.

     

    This pin is configured within the SwyxWare Administration User Configuration panel.

     

     

    Attention!

     

    When implementing own pin verifications in call routing script, one can easily come to the conclusion that using an own variable with the name pin

     

    This will now interfere with the build-in function PIN() (VBScript is case insensitive) and instead of somehow throwing an error because a name is re-used, it favors the function above the variable.

     

    So if you use a comparision like this to check if an entered pin ok

     

    image.png

     

    it will not check if the caller entered "12345" which has been stored into the own variable pin, but instead if the users' phone login PIN() is "12345". 

     

    No error is thrown, but this is definitely not the intended behaviour.

     

    The solution for this problem is easy: don't name your own variable pin, but for exmple sPin.

     

    image.png

     

     

     


    Tom Wellige
     Share


     Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.