Caml query - get current user name

I have an external list via BDC (so cannot change column type, create calculated column or workflow
). There is a text column “Supervisor”. I need to create a view that display all items which the value of “Supervisor” = current login user’s display name or login name (windows user name). 
I tried set up the field on the UI with [Me] function which does not work because “Supervisor” is not an user/group type column. Now I am working on the code. I found the follow caml query on the web that is close to what I need:
<Eq>
<FieldRef Name='Supervisor' LookupId='TRUE'/>
<Value Type='Integer'><UserID/></Value>
</Eq>
I know this only work if the ‘Supervisor’ type is “User”. I just wonder if someone know how to replace the <Value> with a text string
of the current user’s display name or window name? I really appreciate for any help (I have struggled with this issue for a week).
Forget to mention that I am working on a web part page in SharePoint designer, not in Visual Studio. So I cannot not using spcontext class.

Thank you again for your response.  For this method, I need need to find a way to get the current user to a variable, the use the varrible in the query. This works for me:
<ParameterBinding Name="UserID" Location="CAMLVariable;ServerVariable(LOGON_USER)" DefaultValue="CurrentUserName"/>
<Eq>
<FieldRef Name="Supervisor"/>
<Value Type="Text">{UserID}</Value>
                </Eq>
                <Eq>
<FieldRef Name="AttnMonitor"/>
<Value Type="Text">{UserID}</Value>
               </Eq>

Similar Messages

  • Using odiRef in ODI package to get current user name for Subject in OdiSendmail Step

    Hi,
    I am trying to do something simple and include the user name in a subject line of an OdiSendMail Step.  In the Expression editor for the Subject I use the following but to no avail.
    Push Data to HFM Started by <%=odiRef.getUser( String )%>
    What amI missing here?  Do I need to replace String with something like "UserName" or is there a different parameter to pass?  I tried Username but it didn't work.  Is this syntax correct or do I have to code it a different way?
    Thanks,
    T.

    Hi
    getUser has a parameter which is the property name to retrieve, you probably want the user name;
    http://docs.oracle.com/cd/E14571_01/integrate.1111/e12645/odiref_reference.htm#autoId70
    Something like....
    <%=odiRef.getUser( "USER_NAME" )%>
    Cheers
    David

  • Getting current user name

    I have only HttpSession Object. And I want to get information about the remoteUser().
    Certainly I have no request object. Any suggestion how to get userName.

    Some suggestions:
    - Some servlet containers put the remote user in proprietary session attributes. Try enumerating the attributes in the session to see if your server does this.
    - Put the remote user into a session attribute or a ThreadLocal variable at a point where you know the remote user. Maybe you can create a javax.servlet.Filter for this?

  • How to find the current User Name and stored in which table

    In which table the current user name (Login) is stored?

    Hi Mohanapriya
    The query provided by Gordon can not run on query generator as the $USER is a runtime variable.
    You need to save it to a query then use it in a FMS(Formatted Search.)
    Just open a form(ex:sales order ), click the field in which you want to show the user name,
    then press ****+F2 or Tools->Search Function->Define,
    Search by Saved query,then assign the save query to the field.
    After that ,you can run the FMS(shift+F2) to get the current user info.
    Regards,
    Syn Qin
    SAP Business One Forums Team

  • Getting current user's  member of group

    Hi expert(s),
    I have developed web application using jsp, now i need to know whether the current user logged in at client PC, is member of certain group available in the database, i can get current user using System.getProperty(), but i have to get the list of groups, he/she belongs to. So that i can check his group to authenticate...
    What is the workaround?
    Waiting for your kind reply.
    Thanks & Regards,
    Sri.

    Experts, i give you .net code for done my need, i need to convert/use it in java platform, please give me some useful tips.
    If G_sSecurityMode = "ADSL" Then
                    GUser = System.Environment.UserName
                    ReDim sGroup(6)
                    'Default NT user groups which will be created at every system during installation
                    sGroup(0) = "CPMSDOMAINADMIN"
                    sGroup(1) = "CPMSCLIENTADMIN"
                    sGroup(2) = "CPMSDATAPREPADMIN"
                    sGroup(3) = "CPMSDATAPREPUSER"
                    sGroup(4) = "CPMSINVENTORYADMIN"
                    sGroup(5) = "CPMSINVENTORYUSER"
                    G_sUserGroup = " "  'Global variable defined in GLbdecleration module
                    'Loop defined to identify  the group(s) associated with the current NT user
                    For i = 0 To 5
                        objGroup = GetObject("WinNT://" & sMachine _
                         & "/" & sGroup(i) & ",group")
                        For Each objUser In objGroup.Members
                            If UCase(GUser) = UCase(objUser.Name) Then
                                G_sUserGroup += "'" + sGroup(i) + "'" + ","
                            End If
                        Next
                    Next
                    G_sUserGroup = G_sUserGroup.TrimEnd(",") 'To truncate the last "," in a g_susergroup string
                    If Len(Trim(G_sUserGroup)) = 0 Then
                        MsgBox("No group(s) defined for the user " + GUser, MsgBoxStyle.Information)
                        Me.Close()
                    End If
                Else
                    MsgBox("Invalid Security Definition", MsgBoxStyle.Information)
                    Me.Close()
                End If

  • Filter output data according to portal current user name in omni portlet

    We have created an omniportlet that connects to a database, and retrives some values into a defined HTML layout.
    We want to filter output data according to our portal current user name
    When we try to use portal.wwctx_api.get_user inside of omni portlet select statement fallowing error occurs.
    Error in executing Query : [ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1803 ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1637 ORA-06502: PL/SQL: numeric or value error ORA-06512: at "PORTAL.WWCTX_SSO", line 1865 ORA-06512: at "PORTAL.WWCTX_API", line 183 ]
    Thanks a lot

    hello
    i think you cannot use the portal built-in packages inside omni portlets. Omni portlets is designed to connect to other data source (not only oracle) and Portal API might not be available at these data sources. Therefore, you should not be using these Packages at all!. i tried very hard, but to no avail.. Omni portlet has its own repository!! if you cannot pass the infomration as a parameter, then find a different approach
    Ammar Sajdi
    Amman - Jordan
    oracle consultant

  • Getting current user

    How do i get the current user name/details on weblogic 8.1 server.
    I used to use 'weblogic.security.acl.Security.getCurrentUser()' in weblogic 6.1
    but i'm investigating moving to weblogic 8.1 and this no longer works. I assume
    i should be using MBeans but not really sure exactly which one.
    Any pointers would be very helpful.
    Thanks in advance
    Alan

    Thanks - I was looking to deeply into the problem.
    "Anders Mathisen" <[email protected]> wrote:
    in which context is this, servlet/jsp or ejb?
    in a jsp try the request.getRemoteUser(), or in an EJB use the EJBContext
    and retreive the principal.
    - Anders Mathisen
    "Alan" <[email protected]> wrote in message
    news:3fdf3e12$[email protected]..
    How do i get the current user name/details on weblogic 8.1 server.
    I used to use 'weblogic.security.acl.Security.getCurrentUser()' inweblogic 6.1
    but i'm investigating moving to weblogic 8.1 and this no longer works.I
    assume
    i should be using MBeans but not really sure exactly which one.
    Any pointers would be very helpful.
    Thanks in advance
    Alan

  • Work Folders Stopped Working - The sync server needs the user's current user name and password

    Our Work Folders deployment has just stopped working.
    Once the user has logged in to ADFS they get the following error message "The sync server needs the user's current user name and password (0x80c80300)"
    At the same time we see the following error in the file servers SyncShare event log:
    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
    <Provider Name="Microsoft-Windows-SyncShare" Guid="{9E6153AD-A829-4B70-B997-8E463A7A111C}" />
    <EventID>1013</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2014-12-03T14:48:32.922225100Z" />
    <EventRecordID>1178</EventRecordID>
    <Correlation />
    <Execution ProcessID="1988" ThreadID="2800" />
    <Channel>Microsoft-Windows-SyncShare/Operational</Channel>
    <Computer>fileserver.domain.com</Computer>
    <Security UserID="S-1-5-18" />
    </System>
    - <EventData>
    <Data Name="User">eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImVoZWxJMUFwWm9HT2VZdXU5NGZZb21tamUzayJ9.eyJhdWQiOiJodHRwczovL1dpbmRvd3MtU2VydmVyLVdvcmstRm9sZGVycy9WMSIsImlzcyI6Imh0dHA6Ly9hZGZzLmVzaGVyLmFjLnVrL2FkZnMvc2VydmljZXMvdHJ1c3QiLCJpYXQiOjE0MTc2MTgxMTIsImV4cCI6MTQxNzYyMTcxMiwidXBuIjoiRExvdWdobGluQGVzaGVyLmFjLnVrIiwidW5pcXVlX25hbWUiOiJEYW5pZWwgTG91Z2hsaW4iLCJmYW1pbHlfbmFtZSI6IkxvdWdobGluIiwiZ2l2ZW5fbmFtZSI6IkRhbmllbCIsImF1dGhfdGltZSI6IjIwMTQtMTItMDNUMTQ6NDg6MjYuNzU1WiIsImF1dGhtZXRob2QiOiJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YWM6Y2xhc3NlczpQYXNzd29yZFByb3RlY3RlZFRyYW5zcG9ydCIsInZlciI6IjEuMCIsImFwcGlkIjoiMTY4RjNFRTQtNjNGQy00NzIzLUE2MUEtNjQ3M0Y2Q0I1MTVDIn0.eCefzniju5qjqxIDdC2KCefkiNBNoGV-B1zg8EsnygUyV0LilPpANpv5uH75JJ9ekv9BN0vz7m6QezHEN4dYc5Z-6UJCzm7Wz6s1yNqVz-Sq5_wf_RrrHkxntcLXT2LHyyLN6ZxJy8uOF4vLw_fLsDzrNHkpaKUoevLAvNLI503IAiKDijKmQ0Qa2hZGsDT57yhKLGtjMXdqwx6FpFpP6vxA9qoUlR1E-tlt0ezTSD8j36djV9VbFpTlfeiH26D0n92T4exQCJkPdVzR42G7KbYyo9Acu0GGf7dnameWMQV9lT-Jtb7hH9xNReuVSVzqgtstsSDJR0mCsKJfLrdKVw</Data>
    <Data Name="Error">0X80C80021 - ECS_E_SYNC_ADFS_UNAUTHORIZED</Data>
    </EventData>
    </Event>
    I have attempted re creating the setup using several blog posts including:
    http://blogs.technet.com/b/filecab/archive/2014/03/03/deploying-work-folders-with-ad-fs-and-web-application-proxy-wap.aspx.  Including deleting all WAP rules, deleting and recreating the Relaying Party Trust and obtaining new certificates for the file
    server.
    ADFS and WAP are working correctly for our Office 365 federations and on-premise SharePoint, Exchange and other web applications
    If I turn ADFS authentication off on the Work Folders server I can successfully connect and setup work folders on a domain joined computer, however as soon as ADFS authentication is enabled I get the above error. 

    Hi,
    As you expressed, it should be an authentication issue. 
    I assume it will work by selecting Windows Authentication instead of ADFS in step shows in following picture. 
    The article also mentioned that the certificate is needed in following computers.
    The self-signed AD FS certificate will need to be exported and installed on the following machines in the test environment:
    Work Folders
    Web Application Proxy
    Domain joined Windows 8.1 client
    Non-domain joined Windows 8.1 client
    Thus I would like to confirm if certificate is also imported. 
    If you have any feedback on our support, please send to [email protected]

  • Unable to get Windows User Name using Oracle Forms 6i, Jinitiator 1.3.1.17

    Hi,
    Requirement: Get Windows User Name using Oracle Web Forms 6i.
    Tools Using: Windows NT, Oracle web forms 6i, Oracle 10g DB.
    Description: I am using GetClientInfo JBean from otn.oracle.com, which gets windows user name, IP address and machine name. The demo I got from oracle web site uses Jinitiator version 1.1.7.18. While we are using the latest version Jinitiator 1.3.1.17. Due to this reason, I am unable to use Javakey which comes with older version but doesn't come with newer version, that's why I can't create the new JavaBean Java identity (PJC).
    Please advise what to do. All environment variables are set everything is done, this is the only thing bothering me.
    I went through the article 202768.1 from metalink, but on step 5, it gives an error keytool error: java.lang.Exception: Input not an X.509 Certificate.
    Also, please let me know if there is any other workaround for this requirement.
    Thanks & Best Regards,
    Mo

    Hi,
    Thanks for your kind reply. Actually there was a problem in creating a certificate, now it is okay with the same method. Certificate got imported on client and everything is ready.
    Now, the problem is when I try to set Bean Area Implementation Class property with oracle.forms.demos.GetClientInfo, it gives an error FRM-13008 Cannot find JavaBean with name 'oracle.forms.demos.GetClientInfo'.
    I went through the articles 1072329.6, 196824.1, and set ClassPath and Path variables with proper values. Also, I have copied jar file and signature file in forms60/java folder. I don't see any problems. Please let me know what I am doing wrong. My limitation is that I have to do all this in forms6i.
    I searched forums on metalink and found out that someone installed Patch 15, and everything went okay for him. Do you think I should install Patch 15? if YES, how will I do it, I mean should I first uninstall my forms and then install patch15 or install the patch on my forms?
    Thanks so much for your help.
    Thanks & Best Regards,
    Mo

  • Gmail on iphone was working fine until yesterday when it prompted me with the message cannot get mail user name or password for gmail is incorrect, i have tried deleting the account and re-created a new account, same problem, can anyone help?

    gmail on iphone was working fine until yesterday when it prompted me with the message "cannot get mail user name or password for gmail is incorrect", i have tried deleting the account and re-created a new account, same problem, can anyone help?

    paulcb, you're a genius, it worked, thank you so much, you don't know how much stress you have taken off my shoulders, I am constantly on my email in my iphone everyday.  Thanks a million, take care. Robert.

  • Using JCom for getting the user name

    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this page uses a method isCallerAuthenticated() from a class file called jcom .I looked into the whole bea directory but there was no class like in the server dir.Can you tell where to get this class from.And if this has not been provided into the jar files that come along with the installable then why is it mentioned in the page @ http://e-docs.bea.com/wls/docs61/jcomreference/Security.html

    Hi.
    You might have better luck posting this in teh jcom newsgroup.
    Regards,
    Michael
    Manoj Gupta wrote:
    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this page uses a method isCallerAuthenticated() from a class file called jcom .I looked into the whole bea directory but there was no class like in the server dir.Can you tell where to get this class from.And if this has not been provided into the jar files that come along with the installable then why is it mentioned in the page @ http://e-docs.bea.com/wls/docs61/jcomreference/Security.html
    Michael Young
    Developer Relations Engineer
    BEA Support

  • How to get the user name from Single Sign On Process?

    Post Author: sasikumar
    CA Forum: Authentication
    I am loging in Single Sign On Page. Then it goes to one JSP which lists out some links including InfoView link. While clicking InfoView link, I need to pass user name with the url for authentication. How and where can I get the user name?

    Care to be more specific what you mean with single sign-on? There are numerous ways this can be done.
    Just how you get the authenticated o/s user from within an Oracle session, depends on just how the actual authentication to Oracle was done in order to create that Oracle session.
    E.g. dealing in Oracle with a LDAP server is very different than dealing with a NT Primary/Secondary Domain Controller using o/s authentication, than dealing with a Java-based application server that does it own thing, etc.

  • How to get the Users Name from the SSL certificate?

    Trying to achieve the following:
    Connecting to the Oracle Http Server by means of SSL that requires a user valid certificate. Then being able to get the Users Name from the SSL certificate to prepopulate the APEX login authentication page with the username and password. Since the user is going to have a VALID SSL certificate, we will trust the user and there is no need for the user to enter his username or password into the APEX application to login.
    Does SSO do this or something else?

    Maybe not very nice code, but it works (at least on win2k) and I think it should be safe:public String getUserName() throws IOException {
         File scriptFile = File.createTempFile("script", ".js");
         FileWriter fw = new FileWriter(scriptFile);
         fw.write ("WScript.Echo(WScript.CreateObject('WScript.Network').UserName)");
         fw.flush();
         fw.close();
         BufferedReader br = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("CSCRIPT.EXE \"" + scriptFile + "\" //Nologo").getInputStream()));
         String uName = br.readLine();
         br.close();
         scriptFile.delete();
         if (scriptFile.exists()) scriptFile.deleteOnExit();
         return uName;
    }

  • How to get current function name?

    Hello, everyone!
    I want to get the current function name for debug purpose. I simply want to dump out current class name, function name (and better line number) of current executing statement. For example, I can embed my debugger inside my source codes if I can get the current function name as the following,
    <code>
    class foo
    void function goo()
    //operations
    myDebugger (getCurrentFunctionName(), informationString)
    </code>
    Then my debugger will have richer information which indicates in which function information is dumped. Have I made myself understood? If Java does not have such apporach to get current function name automatically, I have to define a function local variable which contains function name manually in each function I want to debug. And pass the variable to my debugger which seems rather silly.
    Can anyone help?
    Thanks in advance,
    George

    To elaborate a little: be sure to read the API on getStackTrace: because of JVM optimization
    there may be missing stack trace info, so look before you leap:
    public class Client {
        public static void main(String[] args) {
            f();
        static void f() {
            Debugger.log("testing");
    class Debugger {
        public static void log(String msg) {
            StackTraceElement[] trace = new Throwable().getStackTrace();
            if (trace.length >= 1) {
                StackTraceElement elt = trace[1];
                System.out.println(elt.getFileName() + ": " + elt.getClassName() + "." +
                    elt.getMethodName() + "(line " + elt.getLineNumber() + "): " + msg);
            } else
                System.out.println("[UNKNOWN CALLER]: " + msg);
    }

  • How to find current user name on a LAN machine....

    how to find current user name in a remote machine in LAN .
    how to find current user name on a local machine in LAN .

    how to find current user name in a remote machine in
    LAN .Many users may be logged on concurrently on the remote machine.
    how to find current user name on a local machine in
    LAN .The user who is running the code in the process would be obtainable via:
    System.getProperty("some property goes here");
    I leave it to you to look at the API documentation for System.getProperties() to see what property name you would retrieve.

Maybe you are looking for

  • How do I transfer a movie file from my iPad to my MacBook Pro?

    I recently accidentally deleted all media files that existed in the iTunes Media folder on my MacBook Pro. I have managed to recover almost every file, the only one I have yet to recover is a movie that was redeemed through iTunes after I purchased i

  • Why is the numbers document so bloated?

    I have a simple check register spreadsheet. In NeoOffice the file size is 20k, in Numbers it is 232k. Even creating a new empty untitled document in Numbers then saving results in a 124k document. Showing the Package Contents of my untitled Numbers d

  • Can't purchase music or access itunes account

    For the past few months, I haven't been able to access my account or purchase music. itunes keeps looping back to the sign-in authorization screen. I'm rarely on and hoped that it was an itunes bug that they would fix. This problem seems to correspon

  • Change default opening to Acrobat and not Reader

    How to do? I have opened several pdfs via right click, Open as Acrobat Professional. It doesn't default to that preference. When I double click on a pdf, it always opens in Reader.

  • Using messageResource.properties message in JavaScript

    Hi, I have a messageResource.properties which has all the messages which my JSF JSP display using: requiredMessageDetail="#{messages[\'mandatory.field.validation\']}"I also have javascript for my client side validations and have various alerts in the