Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7938 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've a script like this:

Enter Find Mode[Restore,Pause]

Set Field[ "USER"," "=="&USER " ]

Set Field[ "Password"," "=="&Password " ]

Perform Find[]

Most of the times it works perfect:

the user types his name/pass, for example:

USER: steve jobs

Password: 123

then the script changes the request for finding

USER: ==steve jobs

Password: ==123

If the users types exactly his name/pass then one record is found and the user is authenticated.

shocked.gifBUT SOMETIMES.... shocked.gif

the script, after finding one record, applies the two "Set Field" to the record in browse mode(instead of applying it only to the find request).

Taking the example, sometime Steve Jobs logs in and his username and password are changed into

USER: ==steve jobs

Password: ==123

I was not able to isolate the problem, it happens with a ratio of approx. 1:15

It happens completely random! It seem a FM bug.

The file is served with FM Server on MacOs9.

It's opened with FM Pro 5.5 on MacOs9.

Any help would be gratly appreciated! Thanks

Posted

You should change the log in script to something like

Script Start log in

Set error Capture [on]

Allow User Abort [off]

Go To layout [login layout]

Set Field [gUser, ""]

Set Field [gPassword,""]

Freeze Window

loop

PauseResume Script [] // for ever

end loop

Script Login

Set error Capture [on]

Allow User Abort [off]

Freeze Window

If [ not (IsEmpty(gUser) or IsEmpty(gPassword))]

Enter Find Mode [] // no restore no pause

Set Field [uSER, "=="&gUser]

Set Field [Password, "=="&gPassword]

Perform Find []

If[status(CurrentFoundCount)=1)

//OK, do whatever you need after

end if

else

//user failed to log in,take appropriate steps

//like re-calling script Start log in, for ex or close app

end if

the second script should be attached to the button with option Exit Current Script selected.

And of course gUser and gPassword are global text fields

Dj

Posted

I was trying to have my login procedure activated at the time the user types "Enter" (just like the real log-in interfaces)

The only way to do that is entering find mode before the user types username and password.

I haven't tried your script yet, but it's clear that the user types his credentials in the global fields in browse mode.

Pressing enter causes a new line to be added in the field the user is typing in.

A lot of users get messed up with it.

Posted

Many users consider the "Enter" and "Return" keys interchangeable -- and for the most part programs treat them so. However technically they are not interchangeable and FileMaker Pro is one application that handles them correctly.

Return is on the main key group, while Enter is on the numeric keypad. The Enter key is the equivilent of clicking the mouse on the default button.

I'll bet they are pressing Return.

Posted

Return inserts carriage returns if the user is in a field.

The Enter key on the numeric keypad exits the field and clicks the default button.

This topic is 7938 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.