Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

10. In this step you will complete the login WebRoutine.

     The login button will be set up to return STDRENTRY with a value of L.

     A CASE loop for field USERID will check password, make the session status active, and execute one or both build menu subroutines. It will then transfer to the welcome WebRoutine. Your completed login WebRoutine should look like the following:

...

     Webroutine Name(login)

...

 Onentry(*SESSIONSTATUS_NONE)
Web_

...

Map For(*both)

...

 Fields(#userid #passwd)
Message Msgtxt('Enter your user id and password')
If (#stdrentry = L)
Case (#userid)
When (= ADMIN)
If (#passwd = '14MIN')
#com_owner.

...

sessionstatus :=

...

 active
Execute Subroutine(buildmenu)

...

     Execute Subroutine(buildapps)

...

     Transfer Toroutine(welcome)
Else

...

     Message Msgtxt('Password incorrect for this user')
Endif

...

     When (=

...

 USER)

...

     If (#passwd = 'US5R')
#com_owner.

...

sessionstatus :=

...

 active
Execute Subroutine(buildmenu)

...

     Transfer Toroutine(welcome)
Else

...

     Message Msgtxt('Password incorrect for this user')
Endif
Endcase
Endif
Endroutine

11. Compile your WAM.

12. Open the login WebRoutine in the Design view.

a.  Add a row to the bottom of the fields table

b.  Add a push button with image to the bottom right hand cell

c.  Set up the push button as follows:

PropertyValue

caption

Log In

left_relative_image

icons/normal/16/user_16.png

on_click_wrname

Login

submitExtraFields

Field Name: STDRENTRY


Literal Value: L

13.  Save your changes.