How to get the Current User on the UI page?

All,
Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
Edited by: 951930 on Oct 24, 2012 12:21 PM

lucky,
my schema has already defined for
<user mapField="USER_ID" default="%CurrentUser"/>
and in my UI page
<td oraLabel="user"></td><td oraField="user" id="userId" ></td>
and my javascript
function showUserId () {                        
var curUser = document.getElementById('userId').value;
alert(curUser);
and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
Appreciate for the help.
Edited by: 951930 on Oct 25, 2012 8:42 AM
Edited by: 951930 on Oct 25, 2012 9:06 AM

Similar Messages

  • How can I get the current user and the current page?

    Hi everyone
    Question..
    It is possible to get the current user (from the user's database on apex) and the current page? (I mean, if I'm in page 4 be able to query a variable / function or something which could give me the current displayed page)
    Thank you very much... I'd been researching without success :-S so I'll appreciate your help
    Regards,
    Fury

    Fury,
    If the user has authenticated, :APP_USER is the name that was used. The current page id is in :APP_PAGE_ID.
    Although I showed bind variable notation for those, & substitution format and v() notation are also available for referencing developer-defined items or built-in names. See the User's Guide for more details.
    Scott

  • How to Get Most Current User View Before Checking In.

    Hi,
    We have several custom workflows which users can start from end-user menu and have some resource accounts created/modified after approvals.
    User view is checked out once at the beginning of each workflow, then some user attributes are modified through forms and user view is checked in with new attributes at the end.
    If any user starts a workflow (say W2) before completion of another workflow (say W1) he started before, and W1 is completed when W2 is waiting for approvals or etc., W2 completely discards changes made to user view through W1 since it has already checked out the user view before.
    If I checkout the user once more just before checkin, I'm able to get a current user view but this time changes made through forms used in the current workflow are lost.
    What's the best way, to get an updated user view of the user without overwriting any changes made out of the running workflow and losing form data?
    Regards,
    Mehtap.

    In a situation like this, you should probably change the front end to store the changes in workflow variables instead of using the view directly. Then, post approval, you checkout the view and apply the changes. I've used this approach to perform changes on large numbers of users (kind of like a bulk action, only more reliable).
    Alternatively, you can checkout the user object at the beginning of the workflow, and this will prevent your race condition by putting a lock on it. This will obviously cause problems (for you) if your users expect to be able to do multiple changes simultaneously. Don't try this approach if an angry mob will storm your cubicle -- IDM coders are hard to come by.
    Jason

  • How to get list of users assinged the same product catagory

    Hi  All ,
      we have a requirement in which we need to get the list of users who are assigned   the same  product category.
    ie if we give the  prod category 14000000 then  we need the list of users assigned the  14000000 prod category.
      is  any FM available.
      please  help.
    Regards
    Channappa Sajjanar

    Hi Chinnappa,
    1) You can create a table query for tables HRT1222 and HRP1222 to get the org Id or Position Id assigned for the product category.
    Then use FM BBP_OM_STRUC_GET_USER_FROM_POS to get the list of users for that org ID.
    2) or if you want to check list of prod categories linked to user ID, then use FM BBP_READ_ATTRIBUTES
    rgds,
    Ravi

  • How to get Most current record in the reporting

    Hi All,
    I have reporting requiremnt  like to get the most recent record.
    Please see the below example we have 3 records but with 2 different sales represtentatives assigened to the same document.but i need to get most recently assigned sales representative record  that is number 2(10726056 and status open).
    Now i am geeting the 2 open records .Need to get only one.we do not have any other difference in the records to keep track of the sales representatives assignment to get the new sales rep id other than request id.
    Can any one tell me  most rcurrent data varibles under the request id do.Will it solves my issues o r any other ideas please welcome.
    Customer No    Sales rep    Doc number    Status     Request id
    0000613086    10726056    9000783660       C            REQU_1
    0000613086    10726056    9000783660       O            REQU_1
    0000613086    10182679    9000783660       O            REQU_2

    Hi Sirisha,
    it seems to be a problem of the kind "exception aggregation" , but let me say it can result in a very complex solution.
    What about using a Virtual Infoprovider with servicecs to solve the issue?
    You should create an additional InfoCube that reads form the basic one (where you have data) and then you should "delete" invalid records considering the request number.
    By the way time stamp seems to be the easier solution.
    Hope it helps
    GFV

  • Query to get objects list for which the current user has 'SELECT' privilege

    Hi,
    I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views. The privilege information for the current user is scattered in more than one system views. I have following system views
    USER_TAB_PRIVS_RECD - Object grants for which the current user is the grantee
    ROLE_TAB_PRIVS - describes table privileges granted to roles. Information is provided only about roles to which the user has access.
    If the object privilege is granted explicitly like "GRANT ALL ON TABLE_NAME TO "USERNAME" then this privilege entry goes to USER_TAB_PRIVIS_RECD
    If the object privilege is granted by ROLE. Role is created with certain object privileges. this role is assigned to user "GRANT ROLE_NAME TO "USERNAME"", then this entry goes to ROLE_TAB_PRIVS
    From these findings, I have composed below query
    (SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT')
    Have I got user's all prvilege details? should I look some other system views?
    How to exclude system table privileges details?
    (SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT' AND OWNER NOT IN ('SYS','SYSTEM') Is this right?
    What about Public role in Oracle? Should I consider public role here?
    Oracel Version :11g
    I want make this query to work on Oracle 8i or above version
    Thanks

    >
    I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views.
    >
    You will need a hierarchical query to do that.
    Try this script for Listing privileges recursively for Oracle users
    http://www.adp-gmbh.ch/ora/misc/recursively_list_privilege.html

  • How to get information about user's capabilities in content folder

    Dear collegues,
    I created a few portal pages associated with folders in WLP Repository. These pages contain portlets which display the content of the associated folders of a repository.
    Also I've created portlet - Uploader for MS Office files (Uploader gets properties from file, controls it and puts it in associated atributes of new content item). And I've created Delegated administration roles with create|update|publish capabilities for folders of a repository.
    Now I need to put on my portal pages control which will display link to Uploader if current user has create|update|publish capabilities to associated folder (via DA role).
    But I have faced 2 problems:
    1) If user (with DA role) logins from portal page (I use sample login portlet) he cannot create item in repository via Authorization exception (but from Portal Admin Console he can!);
    2) I couldn't find API which shows the current user has the necessary capabilities in a corresponding folder.
    Help me, please!
    Edited by: 817211 on 01.12.2010 4:51

    In addition to my post#1 next information to break youк mind.
    Today I also have created visitor entitlement (enterprise application scope) and associated content folder/items with view capability for this role.
    After I have login on portal page via Sample Login Portlet with my credentials (visitor role above) I have found out that I have no rights to viewing of the necessary content.
    What is a problem? May be it's Sample Login Portlet? Or I have to made some additional actions after login to get the existing visitor entitlement rights for current user?
    --Alexander                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get the current user name of the host who is occupying a specific VM?

    I'm developing a winform app with c# code to manage Hyper-V. I need to remind someone if he/she would take a VM which has already been occupied by others.
    Is there any powershell cmd or WMI interface to get the current user of a specific VM?
    Thanks!

    Hiya,
    from cmd there are quser(Query user) and qwinsta(Query Session)
    which should give you that. Don't know how you can incoorperate that in C#, but that should give you something to work with :)
    https://technet.microsoft.com/en-us/library/cc785434.aspx
    https://technet.microsoft.com/en-us/library/cc788125.aspx

  • How to get the current user logon to portal?

    Hi Gurus,
    How to get the current user who logged into portal.
    I have a webdynpro requirement where in which I have to get the current user id who loggedinto portal which will be the input parameter of the BAPI(adaptive RFC model) which will return me employee number of the particular user.
    Can anyone send me the code to retrive the user id through webdynpro application..........
    Pts will be rewarded for useful inputs......
    Thanks in Advance,
    Dharani

    Hi Dharani,
    Using UMEfactory u can do that...
    1. create one input field,
    2. create one attribute called Uid
    3. assign Uid attribute to the input field
    4. type the following code in Doinit() method
                String uid = wdContext.currentContextElement().getUid();
         try {
         IUser user = UMFactory.getUserFactory().
         getUserByLogonID(uid);
         String userName = user.getDisplayName();
         } catch (UMException ex) {
          e.toString(); 
    5. after that go to Portal create one iview assign to particular user. then u get into the user details...
    thats it
    Regards,
    P.Manivannan

  • How can I get the current user an  resource context  in a portal JSPDynPag

    How can I get the current user (com.sapportals.portal.security.usermanagement.IUser?)an the resource context  in a portal component (JSPDynPage)?
    Thanks.

    Hi Jon,
    Here is the code to get the current user and resource context in your JSPDynPage:
    IPortalComponentRequest  currentRequest  = (IPortalComponentRequest)pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);
    com.sapportals.portal.security.usermanagement.IUser contextUser = (com.sapportals.portal.security.usermanagement.IUser) currentRequest.getUser().getUser();
    ResourceContext resourceContext = new ResourceContext(contextUser);
    Greetings,
    Praveen Gudapati
    p.s. points are always welcome for helpful answers

  • How to get the name of the city and state of the current location of the user

    Hi all
             i need to get the name of the city and state (full address) of the current location of the user.
    need help.

    The best way to do this is to put the monitor name as a property bag in the script and pass that to your event details. Otherwise, we're looking at querying the database each time the monitor generates an event, and this is overhead that is really not
    necessary. The other option, which is just even worse in terms of performance, is to use powershell to query the SDK for the monitor name. Both of these options are not going to be a good solution, because now you need to implement action accounts that can
    either query the database or the sdk.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • How to get the current User Id

    Hi,
    is there any system variable containing the current "user code"
    because, based on current user code, i would like to get the branch from OUSR, so that, one query can display only those records pertaining to that branch.
    Thanks & Regards,
    Kr

    Hi
    You can create a formatted search to get and the following query:
    SELECT T0.U_NAME FROM OUSR T0 WHERE INTERNAL_K = $[USER]
    Paulo Calado
    SAP Business One Forums Team

  • How to get cwd of the current process in the kernel in Solaris 8

    Hi, everyone
    Does any one know how to get the path name of the current working directory of the current process in the kernel in Solaris8 ?
    I searched the forum and got some related links, but none of them gives a clear solution.
    Sample code can help a lot!
    Thank you!

    NiuLin wrote:
    Thanks for the reply.
    What the user structure contains is the vnode pointer of the cwd, but I want go get the pathname of it, like /export/home/abc/.First, all you can get is a path name - there can be more than one. And then there's the problem of determining the path name you want if the process is running under chroot.
    Assuming you don't have to deal with those, there's this thread:
    http://forum.java.sun.com/thread.jspa?threadID=5084620&messageID=9298124
    Of course, that thread doesn't say how to do that. But it appears to be part of Solaris 10.
    I once had to solve this same problem for a Linux kernel module I wrote, so I know it's theoretically possible. But I also know it's not as simple as it seems it should be, and any results you do get are not guaranteed to be unique and, IIRC, not even correct in some cases.
    Sorry I can't be more specific than that right now.

  • How Do I Display the Current User Name on SharePoint

    I have a customer using a hosted SharePoint 2013 multi-tenant solution and they have asked to have the end user's name to be displayed when logged in. It seems like I have seen this done on other SharePoint deployments but I can't seem to figure out how
    or where to enable this now.
    Can anyone tell me how to display the current user's name in SharePoint 2013?

    Hi
    check this solution
    http://www.c-sharpcorner.com/UploadFile/sagarp/how-to-get-the-current-logged-in-user-and-display-name-using/
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How do I report the identity of the current user of my stolen iPhone 4?

    I had my iPhone stolen last year and have finally (through Find My Phone) discovered the identity of the current user - he's changed my name to his - together with his Apple ID and reference numbers. Fortunately it was erased by my original Find My Phone instruction. But how do I get this thief/receiver of stolen goods sorted out?

    Call the police. Apple is not a law enforcement agency.

Maybe you are looking for