USER/TODAy in forms
Posted in 1994
posted by: kistler@an.hp.com (Jim Kistler)
> The TODAY function seems to work okay in a form in which I want to aid
> the user by filling in today's date, but USER doesn't.
>
> How can I "capture" the $LOGNAME of the user with "USER" in a form's field?
If using a 4gl program to access the form, the function "USER" appears
to be a pure sql command that is not available in 4gl code but
can be used as a constant in a select statement.
The only way I have found to use it is as a constant in an insert or
update statement, or
(really cheesie)
select user from systables where tabname = "systables"
This will give you the suer name. You need to do a select to get it.
Your select must select one row only or the user_name will be returned
that many times. I usually do this as part of init routines where
I need to grab single control records anyway.
If anybody has a better way of doing this is 4gl please pass it on.
If the problem is in sql, can't help you, never tried it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Miguel A. Caldera ! Antares Development Corp. ! Phone (210) 490-9626
mac@antares-dev.com ! 1000 Central Pkwy North ! Fax (210) 490-0874
73564,2200 Compuserve ! San Antonio, TX 78232 USA ! #include <std_disclaim.h>
-----------------------------------------------------------------------------
=-> I haven't lost my mind, I know exactly where I left it!!! <-=