How to retrieve the username of the logged in user

Hi, I've been looking for a possibility retrieve some user data like the username of the currently logged in user since yesterday but could not find anything proper. I'm relatively new to APEX. Could someone perhaps point me to an easy-to-understand document? I would be glad if it would also cover the basic of authentication and authorization schemes.

Hi, thanks for your reply. I've already changed my handle but the system said that it would take about one hour for the change to be done.
Actually I have the following situation. I have a table that associates IDs to names. The names are the same as the user names of the users in APEX. On an APEX-Page I have a select-box that lists all available IDs. What I want to do is to automatically pre-select the ID of the currently logged in user. So I have created an authentication scheme as described in the help using following options:
Based on a pre-configured scheme from the gallery > Show Login Page and Use Application Express Account Credentials
And then I made the new authentication scheme the application's current scheme. Then I went to the page definition and created a new process, selecting "On Load - After Regions" as "Process Point", and entered the following source:
declare
nID number;
begin
:P2_TEMP := :APP_USER; -- this is just for debug purposes
select b.ID into nID from MYTABLE b where b.NAME = :APP_USER;
:P2_ID := nID;
exception
when others then
null;
end;
But it doesn't work. Since the text field P2_TEMP stays empty I believe I am doing something wrong with APP_USER. Anybody who can help me with that?
Edited by: user10977071 on 05.04.2009 08:57

Similar Messages

  • How can I get the username of the person currently logged in?

    I have built a custom authentication scheme and I am building a form page and I would like to show the username of the person who is currently logged in? How can I do this......

    Use the <tt>APP_USER</tt> built-in substitution string.
    This value can be referenced in various ways, including the static text exact substitution method <tt>&APP_USER.</tt> which can be used in page and region templates to display the current user name.

  • I have Mac mini 2.0/2x2gb/2x500/AP/BT, and i forgot the username and the password. How can I resolve the problem?

    I have Mac mini 2.0/2x2gb/2x500/AP/BT, and i forgot the username and the password. How can I resolve this problem?

    The username is the name attached to your Home folder - /Users/username/. If you don't know the password then it can be changed but you will need the installer DVD that came with the computer for the installed version of OS X. You have not provided that information.

  • Problem in changin the username at the Step Level

    Hi All,
    I had a small problem with background processing in SM37.I was trying to change a job which was running from my Id to some other Id which I needed to run from.I changed it successfully, but the problem is the job is running under new Id now, but all the steps related to that job are running under my id(i.e., old id) itself.Could anybody please help me out how to change the username at the step level also?
    Thanks in advance...
    Regards,
    Sravanthi

    hi
    ->Log on to the new Id and select the job which was running under old id.
    ->Then,make a duplicate copy of the job from the menu option Job->Copy.
    ->Now, it will ask for a name give the new name
    ->Now, that job will be under new id in Shcheduled status.
    with all the steps being under old id still.
    ->Now, again select that particular newly copied job and
    ->click on step,Select the step by clicking on it.
    ->And, now go to the menu option Job->Change,there u will be able to change the userid from the old one to the one which u wish to have.......That will work fine after releasing the job from Scheduled status to Release status.
    regards
    venkat

  • Is there a way to prevent AnyConnect from caching the username of the last person who connected to the VPN?

    Is there a way to prevent AnyConnect from caching the username of the last  person who connected to the VPN?

    This can be done via specifying the "RestrictPreferenceCaching" parameter as described in the Anyconnect Admin Guide here:
    By design, AnyConnect does not cache sensitive information to disk. Enabling this parameter extends this policy to any type of user information stored in the AnyConnect preferences.
    •Credentials—The user name and second user name are not cached.
    •Thumbprints—The client and server certificate thumbprints are not cached.
    •CredentialsAndThumbprints—Certificate thumbprints and user names are not cached.
    •All—No automatic preferences are cached.
    •false—All preferences are written to disk (default—behavior consistent with AnyConnect 2.3 and earlier).

  • How to retrieve the username/password of logged user so to use web services

    Hi Experts,
    we are using web services from a web dynpro application, the web services we use are CAF web services; actually we are "hardcoding" username and password so to be able to execute these web services, using this code before calling the web service:
    wdContext.currentRequest_ReporteDeRendicionDetallada_RElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"testuser");
      wdContext.currentRequest_ReporteDeRendicionDetallada_RElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"testpassword");
    but as this is not a very good practice, we want to replace the "testuser" with the logged user and, of course, retrieve the password and use it instead of "testpassword".
    How can we achieve this? I couldn´t find any tips on this.
    Best regards,
    Marco.

    Hello,
    thanks for your anwsers, although I´ve followed both links I couldn´t find the answer to my problem.
    I need to know how to retreive user and password from the UME of the portal so to be able to execute web services in the java stack, the UME is connected to a LDAP in our corporation.. so may be the passwords are not stored in the UME?
    If it is not possible to retrieve the passwords of the users , which is the best practice to deal with username/passwords to execute CAF webservices from web dynpro java? Hardcoding is not a very good practice..
    Best regards,
    Marco.

  • How to insert an username from the login page to the form page

    Hi friends,
    I created one database apex application in which it consist of three pages...
    1)login page----->1
    2)form page along with report page(in same page) i.e. i created a report region within a form region
    3)form page(this page appears when i click the edit option in my previous report page
    (i.e.) my 3rd form page depends upon my 2nd report page, as soon after i click the edit option of each and every row in my report which is in 2nd page it has to go to the corresponding 3rd form page for making an updations in each and every row...
    I have created my above listed applications....
    But the scenario for me is since the login page contains two fields, that is
    user name:
    password:
    so i will be giving my name in the user name and also respective PW for accessing to my 2nd and 3rd page in my application...
    Since my 2nd form page consist of following fields like
    *) user name---------->
    *) assigned to
    *) status
    *) start date
    *) priority
    so my requirement over here is soon after i logging into my application through the user name and PW into second page, while coming to the second form page
    my user name field in my 2nd form page has to get inserted automatically with the user name that i have entered in the login page...
    example: my user_name in login page is :harry
    after going into the second form page with the user name "harry"
    the field of my 2nd form page "username" has to get automatically generated with the name "harry"
    Whether it is possible friends to do this in my application....i doesn't have any idea of it...Kindly help me friends to solve my scenario...please explain each and every steps in detailed manner...
    Since the user_name: harry, is of I got from the admin side as a developer for the workspace......
    Thanks in advance
    Harry....

    Hi Karthik,
    I made the following changes that you said, but there is just a one change in it...
    You told these changes
    Source Used: always, replacing any existing values in session state.
    Source Type: Database column
    Source value or expression: (respective column name)
    and in Default: u need to give-----> &APP_USER.(exactly the same including the full stop)....
    Thanks for your help Patel....I just worked and inserting for me in table of the corresponding user name who login.....

  • How to get the name of currently logged in user in the network

    Hi all,
    I want to know if there's a way to get the name of the currently logged in user in the network.
    SYS_CONTEXT('USERENV','OS_USER') won't work for me because our users do not loggin in portal.
    Any ideas?
    Thanks in advance.
    Brett

    Hello, I had the same problem. Here is a smaller version to find the Group of the current User.
    The VI get the members of a Group and match it with the Username.
    Note :
    If the User belongs to multiple Groups the the VI returns only the 1st Groupname
    If the User belongs to no Group then the VI returns "unknown Group"
    The VI is written with LabVIEW 2010 and TestStand 4.2.1
    Attachments:
    current user group.vi ‏20 KB
    TestStand get Group of current User.PNG ‏43 KB

  • How to retrieve characters like '£' from the database and write to xml file

    Hi ,
    I have a requirement to retrieve the data from database and write to files in XML format.
    I am able to do so successfuly by using XMLElement tag and writing to file through UTL_File package.
    All characters like <&@^ get converted properly, but when it comes to multibyte chars like '£', they are not able to get converted as it is.
    Can somebody please advise me how to go ahead.
    Regards

    Thanks odie.
    The nls_charset for my database is WE8ISO8859P1 and database version is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi.
    The data (with pound sign) is sitting in one of the columns of the table and when i query it directly, I am able to view it properly.
    However when I use the below code to retrieve in XML format and print it to file, it gets changed. This file is also passed to one of the application GUI where this XML gets processsed and it is not visible properly.
    below id the sample abstract of code I am using.
    Declare
    l_file UTL_FILE.FILE_TYPE;
    l_clob CLOB;
    l_buffer VARCHAR2(32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    Begin
    SELECT XMLElement("case",
    XMLElement("comments",
    XMLElement("comment",
    XMLElement("comments",a.COMMENTS)
    ).getClobVal() val1 into l_clob
    FROM TO_COMMENTS a
    l_file :=
    UTL_FILE.fopen (XMLDIR,
    test.xml,
    'w',
    32767);
    LOOP
    DBMS_LOB.read (l_clob,
    l_amount,
    l_pos,
    l_buffer);
    UTL_FILE.put_line (l_file, l_buffer);
    l_pos := l_pos + l_amount;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.NEW_LINE('Reached end of file');
    END;
    The comments column given contains the character like pound.
    And once the file is generated and i see using the vi editor, the char is not viewable properly like £
    And when the same is passed to GUI application to be processed, its not viewable propely in GUI from IE as well like �.

  • How to retrieve SQL statement in the CR 2008

    I'm using Crystal Reports 2008 in MS Visual Studio 2008, how can i retrieve SQL statement from *.rpt file, i have tried this code, but it doesn't work:
    ReportDocument rdReport = new ReportDocument();
    rdReport.Load("Reports/EmployeeTest.rpt", OpenReportMethod.OpenReportByTempCopy);
    CrystalDecisions.ReportAppServer.Controllers.RowsetController rsController;
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rdClient = rdReport.ReportClientDocument; // on this line it throws an exception "The ReportClientDocument property can only be accessed when the report is opened using a Report Application Server."
    CrystalDecisions.ReportAppServer.DataDefModel.ISCRGroupPath rdGroupPath = new CrystalDecisions.ReportAppServer.DataDefModel.GroupPath();
    string temp;
    string sql;
    rsController = rdClient.RowsetController;
    sql = rsController.GetSQLStatement(rdGroupPath, out temp);
    maybe i'm doing something wrong ?
    thanks

    Hello Ludek,
    when I try to get the report from the session I got an error like this (I am using State Server Session mode i.e out proc in my application)
    ReportClientDocument     'reportDocument.ReportClientDocument' threw an exception of type 'System.InvalidOperationException'     CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument {System.InvalidOperationException}
    +base     {"The ReportClientDocument property can only be accessed when the report is opened using a Report Application Server."}     System.SystemException {System.InvalidOperationException}
    StackTrace     "   at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ReportClientDocument()"     string
    so is it the problem of not opened with RAS. Does installation of RAS solves the problem, If so Is it a free-ware or needs to be purchased.
    Ashok

  • How to retrieve data from inside the folders in SharePoint SSRS

    Hi ,
    How to get the data from inside the folders and subfolders.
    How can I do that.
    https://social.msdn.microsoft.com/Forums/en-US/15451351-4ee2-428c-a0b7-135810e4cbfa/action?threadDisplayName=ssrs-reports-sharepoint-list-datasource-how-to-retrieve-items-from-subfolders
    Here the information is not given.
    Regards
    Vinod

    Hi Vinodaggarwal87,
    According to your description, you want to retrieve data from sharepoint list in a sub folder. Right?
    In this scenario, we should select the XML data source type and in the connection string provide the
    List.asmx service URL when creating data source. Then we need to use the List web Service and specify "recursive" for ViewAttribute in Lists.asmx. For detail steps, please refer to the links below:
    Generate SSRS report on SharePoint List with folders using List Service.
    SSRS: how to specify ViewAttributes when creating a report against a SharePoint's list
    If you want to set the ViewAttribute on CAML query level. You need add the view tag outside of query tag:
    <View Scope="RecursiveAll">
        <Query>
            <Where>...</Where>
        </Query>
    </View>
    Reference:
    View Element (List)
    ViewAttributes Recursive Scope not working SharePoint 2013 CAML Query to fetch all files from document library recursively
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to retrieve lost data from the reset Blackberry?

    Hi all, I accidentally reset my Blackberry curve 8250 when i wasnt sober and all my phone contacts, sms and notes were lost. basically i use my bb as a note pad so there were many info saved on the phone. i didnt do any backup before, but i really wanna retrieve the lost data desperately. is there any method or third party software which can retrieve the data or its not possible at all? please help me out w this. thank you!!!!!

    Please see the answer to your duplicate post here:
    http://supportforums.blackberry.com/t5/BlackBerry-Curve-BlackBerry-8500/URGENT-How-to-RETRIEVE-LOST-...
    Please don't post duplicate questions.
    Thanks!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT5312 How to retrieve my answers to the security question;

    How to retrieve Apple ID Security Questions?

    You need to contact Apple, either through the link in that article or by phoning them.
    (77932)

  • I have an old itunes acct in which i can't remember the username nor the password.  I have tons of music under that acct.  How can I regain use of that account again?

    I have another itunes acct I've had years ago with tons of music under that acct.  I have a current one but I can't regain use of the old one because I don't have that email addy anymore, nor the username or password to the itunes acct.  Is there any way I can prove I own that account & regain control of it to get my old music?

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • How to retrieve ip address of the server running PAM inside its module?

    Hello all,
    I've configured Solaris 8 with a deal of ip aliases on the network interface.
    Also I've a handwritten PAM module to auth users. It have some specific functionality which is needed for me.
    For the moment, this module need to be updated. This update requires a knowledge of IP address the user connecting to.
    Is it possible to determine IP address (alias IP) of the machine inside PAM module the user connecting to?
    Thank you for your answers.
    Mikhail.

    > Can i access the ip address of the DB server through SQL or PL/SQL code?
    No. It is the wrong place to look.
    Reason: a sever can, and often has, multiple IP addresses.
    So when you run SQL or PL/SQL code (or a Java stored proc), that will likely report the 1st IP address of the server - and you could have connected via another IP address of that server.
    The actual socket call to get the hostname returns an array of IP addresses. So which one is the correct one? How do you know whether or not your client session connected to the 1st IP in this array?
    The correct place to look is at the socket handle for that Oracle session on the client. And determine to what IP address that socket is connected to.
    This is not that easy - I do not think that the OCI exposes the socket handle it creates. But you can use kernel calls to get a list of established TCP sessions and to what IP address they're connected to. The netstat command on Windows and Unix/Linux is an example of how this can be done.

Maybe you are looking for