0 Replies Latest reply on Jan 19, 2017 6:34 AM by ChristofferRexen_1

    Parsing Parameters in WebDirect, different result


      Hello everyone,


      So parsing parameters into WebDirect, but getting a somewhat dull result.



      Accounts Table managing all WebDirect clients, with Username, Password and UUID.



      http://Server_IP_Address/fmi/webd#DatabaseName?script=ScriptName (OnFirstWindowOpen) &Parameter=XYZ (UUID)




      Set Error Capture [On]

      Allow User Abort [Off]


      Variable [$error ; Get ( Lasterror ) ]

      Variable [$$UUID ; GetValue ( Get ( ScriptParameter ) ; 1 ) ]

      Go to Layout [ "_Accounts" ]

      Enter Find Mode

      Set Field [ _Accounts::UUID ; $$UUID ]

      Perform Find


      If [ Get ( FoundCount ) ]

      Set Field [ Global::AccountName ; _Accounts::UserAccountName ]

      Set Field [ Global::AccountPassword ; _Accounts::UserPassword ]

      Re-Login [ AccName = Global::AccountName ; Password = Global::AccountPassword ; With Dialog: Off ]


      Go to Layout [ Certificate ]

      Enter Find Mode

      Set Field [ Certificate::UUID ; $$UUID ]

      Perform Find

      Go to Record [ Last ]


      Exit Script



      //Error nothing found

      Exit Script

      End If


      Exit Script


      Now for starters, I know this isn't the most secure solution, although the customer did not bother.


      Now with the script, I can try parse a different $$UUID, but be getting the same result - like landing on the same Certificate, even tho I have parsed another $$UUID.


      Furthermore when trying to Re-Login, this does happen - but FM always seem to be getting the first record ever created in the "_Accounts" table.


      I seems like WebDirect isn't collecting the Parameter in the URL...


      What am I doing wrong?

      Please let me know, if you need further from me.