{{tag>category:"OpenInsight 32-Bit" author:"Dimitri Mandelis" author:"Donald Bakke" author:"The Sprezzatura Group" author:"[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]" author:"Mike Ruane" author:"Aaron Kaplan"}}
[[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]]
==== Verfying UserName in a line type control (OpenInsight 32-Bit) ====
=== At 13 JAN 2005 11:16:04PM Dimitri Mandelis wrote: ===
I've using the default value of USER in an edit line control but I can't
seem to validate it. I've tried USER and @USERNAME in the Validation Patter section but they dont work.
What am I Missing?
thanks
Dimitri
----
=== At 14 JAN 2005 12:11AM Donald Bakke wrote: ===
Dimitri,
What kind of validation are you trying to do? Is this a literal, verifile, UDC? Is the problem that the default should actually be failing but it isn't or something else?
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 14 JAN 2005 03:30AM The Sprezzatura Group wrote: ===
If you want to verify that it's a valid user name, then you'll need to write a user defined conversion.
The problem you'll have is that the system won't simply give you back a listing of users.
There is a LIST_USERS routine, but it is a routine, so it won't return the names back into a variable, but will place them into the system receiver. You can do this in a window, if you set an invisible listbox to be the receiver. This will then hold the user names and you can verify against them.
Alternatively, there is a checkLegalUserFunction, but this requires that the user enter the password as well.
I think the LIST_USERS into a receiver control is the best bet.
Check the help on RECEIVER property for more information.
The Sprezzatura Group
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 14 JAN 2005 04:21AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: ===
And of course there's the Get_DB_Users() function that will return the list of users to a variable... :)
userList=get_DB_Users( appID )
[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 14 JAN 2005 07:42AM Mike Ruane wrote: ===
Dimitri-
It's what we're missing- I made a new function for this specifically call IsValidUSer, but it didn't get put into the readme or the updated help.
Function IsValidUser( charstr newDB, charstr userid)
Returns a true for valid user, false for an Invalid user.
Subroutine Test_IsvalidUser(dummy)
Declare Function IsValidUser
isValid=IsValidUser(@dbid, 'ELVIS')
It'll be documented in the 7.1.1 release
Sorry for the inconvenience-
Mike
----
=== At 14 JAN 2005 08:22AM Aaron Kaplan wrote: ===
Thank you very much...
(Well, somebody had to say it)
----
=== At 15 JAN 2005 12:28AM Dimitri Mandelis wrote: ===
Thanks for all the responses.
Thanks for code Mike
*******************************
Don,
I was trying to use the USER default as one of the acceptable choices
in a key field. But I couldn't find to bring up @USERNAME to verify that the name in the key field was really the name of the person
logged in.
----
=== At 15 JAN 2005 01:25PM Donald Bakke wrote: ===
Dimitri,
Can we assume you got this working then?
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=B063706773F5DC7C85256F89001771E1|View this thread on the Works forum...]]