Login form or procedure

Hi,
Are there can help me of creating login procedure? or it will be fine if there’s any example of the procedure.

thanks

Joe

Create a window with hidden failure message and with ENTRY boxes to accept your user details (e.g. ID plus password) and buttons to Log-on and cancel. Check user input with the ABC FileManager Fetch() or TryFetch() methods against your user file, capturing whatever the ABC outcome is. Make it more sophisticated with a set number of failed tries(3?), CYCLE, UNHIDE(FailMessage) until all the attempts are used up. Make the cancel button set the return variable to Level:Cancel and close the window. Return the final ABC either after a successful Fetch, or when all goes are exhausted forcing the close window from the log-on button (assuming by now the return variable holds the ABC failure from Fetch).

In the Frame embeds find ThisWindow.Init then pick a suitable point (I like just after “Enter procedure scope” because that gives a log-in before you see any program frame) make this callout and if the return is other than Level:Benign, return Level:Fatal.
e.g. IF LogonProc() THEN RETURN Level:Fatal.

If Level:Benign the Init will proceed, other levels and your program won’t start.

Regards, Jim

I’ve try but still not success, can you give me simple example app ?
thx

Hi,
I don’t know of an app or template for sale unfortunately. I always write my own roughly as described. I am an employee of the UK NHS so don’t own the code to share it either. It may help if you tell me exactly what the issue is?.
Obviously the suggestion I gave is ABC chain specific. If you are not using them the concept remains the same:
Before your main FRAME Window Opens call the logon window and return something that tells you the UserFile lookup was a success of failure and if the lookup fails, force a Closedown before the Main FRAME even opens.

These are the most likely things to look for:
Check that your Logon return value is initialised to a failure (e.g. ABC = Level:Notify) and only gets reset to pass (ABC = Level:Benign) by the file lookup called from the OK button itself. If you are allowing a set number of attempts, make sure each failure increases the attempts as you CYCLE until the max is reached after which you allow the window to close with the returned value still at failure.
If you have added a Timer too, make sure each user entry resets the monitoring variable to.zero.
Regards, Jim