EDK Query By User Name

Hi There,
I'm trying to use the EDK to query by a user's name, but I"m having a bit of trouble.
In C#, I can use the code below to successfully query for a user(s) by ID. For example, here I want all users with user ID above 200:
RemoteSession = RemoteSessionFactory.GetTokenContext(PortletRequest.GetRemoteAPIEndpoint(),PortletRequest.GetLoginToken());
UserObjectManager = RemoteSession.GetObjectManager(ObjectClass.User);
int iFolderID = 0; /// 1 is the admin root folder, 0 sets all folders?
int iStartRow = 0;
int iMaxRows = 10;
int iMinObjectID = 200; // this is where non-standard plumtree users
ObjectProperty sortProperty = UserProperty.Name;
bool ascending = true;
ObjectProperty[] ReturnProps = new ObjectProperty[] { UserProperty.ObjectID, UserProperty.Name };
QueryFilter filter1 = new IntQueryFilter(UserProperty.ObjectID, Operator.GreaterThan , iMinObjectID -1);
QueryFilter[] filters = new QueryFilter[] { filter1 };
UserObjectQueryResults = UserObjectManager.QueryObjects(iFolderID, iStartRow, iMaxRows, sortProperty, ascending, ReturnProps, filters);
However, when I use as my filter the following:
string sNameToSearch = "karen";
QueryFilter filter1 = new StringQueryFilter(UserProperty.Name, Operator.LessThan, sNameToSearch);
I get all sorts of erros, depending on the Operator used (i've tried all of them). Most of the operators (like LessThan, EQUAL, Greaterthanorequal, etc) error that they require anything but "empty or a BSTR" (ie they dont take a string). The Operator "IN" says that it needs a 1D SAFEARRAY. However, in .NET, the function asks for a string, which is what I am providing.
Any help / suggestions you could provide would be great?
Also, can you confirm that the new EDK will be out in January? Do you have a date yet? Also, is it true that you will be able to query for user profile information (of other users, not just the current user) at that time?Thanks!Karen

Hi Karen/John,
To query for a specific username, you can use a StringQueryFilter, specifying the property as ObjectProperty.Name (or UserProperty.SimpleName etc), the operator as Operator.Equals, and the username as the operand. This will match the specific user with the supplied name.
Unfortunately if you are attempting to match a substring within the Name, this is not possible with the current EDK. The In operator operates on arrays (as you have seen), you need a Contains operator to match substrings, which will be available in the new EDK.
We do not have a concrete date set for the new EDK release (mainly due to dependencies on other produces, such as portal 5.0.2), but we are expecting it to be release at the end of January.
Jonathan

Similar Messages

  • Last Logon User name query attribute not populating

    I have created a query that looks for all desktops in my environment and returns the hostname of the PC, the computer system model, and the last logon user name of each machine.  The problem is about 200 PCs do not have the last logon user name field
    populated.  The remaining 350 desktops and all laptops are reporting this.  I have been looking at this for the last several days but cannot find a reason why.  I verifed the PC have had at least one person log into them.  I thought maybe
    it is an issue with the SCCM client on the PCs so I have tried unistalling/reinstalling the client on a few machines.  After the reinstall is complete, the query shows my domain account as last logged into that PC, as I would expect.  However, no
    matter how many times I log into and out of the same PC with a different domain account, the query doesn't show this.  Can anyone help with some direction with this?  I am running Config Manager 2012 SP1 CU2.
    Thanks in advance.
    Mike G

    Audit logon events it set to capture success and failures.  The Heartbeat Discovery is set to send every week.
    Check your DDM log on site server and look for any error messages.
    I personally run my heartbeat discovery every day.
    You can try to adjust your discovery interval and see if that helps. If you can run it manually and it works, I can't think of anything that it would prevent it from working site wide with currently scheduled interval.
    Also, if you have adjusted your aged data maintenance tasks, this is something worth noting:
    The default schedule for Heartbeat Discovery is set to every 7 days. If you change the heartbeat discovery interval, ensure that it runs more frequently than the site maintenance task Delete
    Aged Discovery Data, which deletes inactive client records from the site database. You can configure the Delete Aged Discovery Data task
    only for primary sites.
    http://technet.microsoft.com/en-us/library/gg712308.aspx#BKMK_HeartbeatDisc

  • Outputting System User Name in Ad Hoc Query (S_PH0_48000513)

    I am trying to create an HR Ad Hoc Query and one of the fields that I am trying to output is System User Name from infotype 0105 Communications.  If I choose this field and do not choose the Communication Type, I get two records per employee - one record with the System User Name populated and one record with a blank value for System User Name.
    If I choose the System User Name field for output and also make a selection on Communication Type (= subtype 0001), employees with no System User Name (i.e. no Infotype 0105, subtype 0001) are eliminated from the report.
    I want the report to show all selected employees, including those without a System User Name; however, I do not want the same employee to appear on the report twice.
    Has anyone else experience this problem?  If so, have you figured out how to eliminate the extraneous record for each employee when you do not select the Communication Type?
    Thanks in advance.

    Hi,
    Love to know if you managed to find a solution for this issue as I'm experiencing the same problem.  However I'm reporting on both system user and email address which are distinct fields and would prefer to see this information only on a single line.  With my report I get communication system user on one line and then email address on the another, I'd also like to be able to include those users where the info types have not been maintained.
    With the query I have created I also included logon data from the USR02 table.
    Cheers
    Bill

  • USER NAMES LIST BASED IN A QUERY

    Hi
    I want to create a user names list base in a result of a query.
    I must give access to specific users which are in table, this table is for accesing to the oracle portal.
    But for defining what users must have access I need another table which contains a field defines what users can access to the application.
    How do I must do for creating this user list?
    The apex application begins when I click in its link created in the Oracle portal, this action sends a parameter of the user name of the portal.
    Based in the username sent, the first page in the apex application must execute a query on load and its result must redirect to the page for user valids or another page for invalid users.
    For that I have thought in doing an application without authentication scheme.
    Also the application must save the username for knowing what user did the last change in a table. But this username must be the same of the oracle portal user name.
    Is posible create a username list in apex which be contains the same user names of the oracle portal? How to do that?
    I expect your prompt reply.
    Any help would be thank.
    Regards.

    I think VPD (Virtual Private Database) and RLS (Row Level Security) are the tools to solve your problem. Take a look at them, there are cool demos on OTN too.
    Andy

  • 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>

  • CSCul66951 LDAP routing query fails when user name is the same (6 july 2014)

    in the case CSCul66951 LDAP routing query fails when user name is the same it is mentionned that the version 8.0.2-055 correct this bug ? How come i don't see this version on my menu Available upgrades from my IronPort C370 ?
    Is there someone on the support team that have try this LDAP query on a IronPort C370 with this version in the development lab ?
    Do i have to open a support Case to have this version of AsyncOS ?
    Best regards,
    Benoit Belair
    University of Quebec in Montreal

    Yes - CSCul66951 - this was included w/ the 8.0.1-HP1, and is rolled into 8.5.6-074 GA release.
    See release notes, resolved issues:
    http://www.cisco.com/c/dam/en/us/td/docs/security/esa/esa8-0/release_notes/ESA_8-0-1_HP1_Release_Notes.pdf
    CSCun02766 - 8.5.6-063, which was superseded by the 8.5.6-074 GA release.  
    See release notes, resolved issues:
    http://www.cisco.com/c/dam/en/us/td/docs/security/esa/esa8-5-6/ESA_8-5-6_Release_Notes.pdf

  • Is there any query to know the multiple users name from their ids?

    is there any query to know the multiple users name from their ids?

    Hi,
    Goto TCode SUIM  Select Users  Select Users by Address Data
    It will give you the users list
    Regards,
    Sankaran

  • Query AD with user name

    Hello,
    Please let me know if it is possible to query active directory...
    1. using just the network name or user name, and
    2. without using any credentials
    If yes, please point me to some examples.
    Thanks!

    Hi,
    Look at Get-ChildItem:
    http://technet.microsoft.com/en-us/library/ee176841.aspx
    You can use that to get your list of files and then check the LastWriteTime property of each file.
    As for deleting, you can use Remove-Item:
    http://technet.microsoft.com/en-us/library/ee176938.aspx
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • SCSM Query shows correct information in SMportal but sends only user name back to scorch

    When creating a services request in SMportal it will send back correct information to scorch and make configution change if I use use text and not query in the request. When using query it will show the information the users should see but SCSM sends only
    the user name back to scorch and not the value that was selected.
    Thanks for the help 
    Hans Petter

    When you create a Request Offering that uses a query, that item is added to the Service Request as a related item. In your case you will need to get the related Active Directory Users for your service request. See the link below for more details on this.
    http://blogs.technet.com/b/servicemanager/archive/2012/05/22/working-with-relationships-in-the-scsm-orchestrator-integration-pack.aspx
    Matthew Dowst |
    Blog | Twitter

  • Getting user name on a query

    Hi,
    I was trying to get the user that is logged on in a query but I can't. I tried using $user, but this only works in a formatted search, in a form.
    What I want to do is run a query where the user can see its active documents, based on the logged on user.
    Is there any way to use $user in such a query?

    Sergi, here is how to...:
    1. save a query SELECT $[USER]
    2. run it from Queries Manager -> you'll get error
    3. go to Tools -> Queries -> User Queries -> run it.. wwau! it works!
    HTH

  • IPhone User Name Query

    Hi,
    The user name on my iphone appears at "pc user's iPhone". I'd like to change this to "Mike's iPhone" but cannot find a way, either on the phone itself or in itunes. If you have any ideas then please let me know.
    Thanks.
    Mike

    Read here:
    http://support.apple.com/kb/HT3965

  • Lost user name query

    can anyone guide me as to how I can either get re-sent my user name or simply re-create a new one ( + hence re-access my e-mail account settings etc..)? Many thks

    how do I get my user name

  • PO Report with user name

    Dear Experts,
    I am SAP FIico consultant but i have a query in MM module. Client need a report of purchase order with the user name , who create the  po.
    Thanx in advance
    Regards
    Aditya

    Hi Aditya,
    You could download the output from table EKKO from SE16.
    Go to transaction SE16 -> Enter table name EKKO -> Enter the selection parameters
    From the output, filter out only the fields you require including the field ERNAM (Created By).
    Then download the list using on of the buttons on the application toolbar ('CtrlShiftF7', 'Ctrl-Shift-F8', 'Ctrl-Shift-F9') or,
    System -> List -> Save -> Local File
    Regards,
    Purnima.

  • Error Message = 3205: '~WF_ADHOC-1446' is not a valid role or user name

    Hi,
    I have an Item attribute of type 'Role' ('CREDIT_COMMITTEE_MEMBERS') and I am using that attribute as performer for two notification activities.
    For first notification, I create an adhoc role and assign it to the attribute and the notification goes successfully.
    I want to send reminder to the people who have not responded to the first notification.
    So I used the following query:
    SELECT recipient_role
    FROM wf_notifications
    WHERE (message_name = 'MSG_TO_CREDIT_COMM_NEED_APPR' or message_name = 'MSG_REMINDER_CREDIT_COMM')
    AND item_key = itemkey
    AND status = 'OPEN';
    The following code was used to update the Item attribute of type "Role"
    FOR rec_cc_role_names IN cur_cc_role_names
    LOOP
    IF l_role_count = 0 THEN
    l_role_users := rec_cc_role_names.recipient_role;
    ELSE
    l_role_users := l_role_users || ' ' || rec_cc_role_names.recipient_role;
    END IF;
    l_role_count := l_role_count + 1;
    END LOOP;
    wf_directory.createadhocrole
    ( role_name => l_role_name,
    role_display_name => l_role_display_name,
    notification_preference => 'MAILTEXT',
    role_users => l_role_users,
    expiration_date => NULL);
    wf_engine.setitemattrtext
    ( itemtype => 'XXCCVOTP',
    itemkey => itemkey,
    aname => 'CREDIT_COMMITTEE_MEMBERS',
    avalue => l_role_name);
    The second notification activity is throwing the below error
    Error Name = WFNTF_ROLE
    Error Message = 3205: '~WF_ADHOC-1446' is not a valid role or user name.
    Error Stack =
    Wf_Notification.SendGroup(~WF_ADHOC-1446, XXCCVOTP,
    MSG_REMINDER_CREDIT_COMM, 07-APR-10, WF_ENGINE.CB)
    Wf_Engine_Util.Notification_Send(XXCCVOTP, 154009, 186344,
    XXCCVOTP:MSG_REMINDER_CREDIT_COMM)
    Wf_Engine_Util.Notification(XXCCVOTP, 154009, 186344, RUN)
    Kindly help.
    Thanks,
    Amit

    The users list was null for the role, which was causing the error. The query populating the user list was not returning any row.

  • How to get Current Log in BO user name in data access driver

    In universe, to get the current log in user is via @Variable('BOUSER').
    Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the query generated by the universe based on the logged-in user info. I only think of using end_sql parameter or adding an universe level filter to patch the @Variable('BOUSER') to the query, which would not work if user want to use customized query.
    Can anyone tell me how to get currentBO user name from connection server ? or how @Variable('BOUSER') is translated into the logged-in user name in the universe?

    Shweta,
    The link you provided was the Auditor guide for BO 6.x, I'm not sure it that is going to help Karen or not.
    Karen,
    There is function called connection
    (usage:  =connection([Query Name]), where [Query Name]
    denotes the name of the tab for the query under Edit Query)
    Here is some of the output from connection:
    4;ODBC18;MS SQL Server 2000166; VERSION=7; USER=xxxxx;
    PASSWORD=; DBTYPE=Relational; DATABASE=xxx_xxxx;
    ODBC_USER=xxxxxx; ODBC_PASSWORD=; BO_DSN=xxxx_xxxx;
    BO_DRV_CONNECT_MODE=0; 224; VERSION=6; Name=xxxxx; Shared=4;
    LoginTimeout=600; Timeout=600; Pool Time=60; Array Fetch Size=10;
    Array Bind Size=5; RecommendedLenTransfert=1000; Password_Encryption=x;
    AliasTable=; MeasureDimension=; Hint=; ConnectInit=; ArrayFetch=1;
    I'm not sure if this info helps out either, being that connection provides info on a post-processing basis and it sounds like you need to get out ahead of the SQL generation.  The @variable('bouser') would seem like the place to be, however, in allowing custom SQL to take place you loose the bouser due to an individual could customize the SQL to the point that it gets unwantingly yanked out.  The end_sql might be your answer...
    Thanks,
    John

Maybe you are looking for

  • Apply password on pdf form submit to php

    I'm trying to submit a PDF fillable form online that will apply a password after the form has been submitted, then email to me, without the mailto:command. Trying to send to a PHPform processor to do the mailto option. Is there a writeup, or plugin f

  • Streatch Moniter versus extended desktop

    Is there any kind of app that will manage your two displays to set them up in a "Streatch display" setting versus an extended desktop setting? Thanks!

  • Create a tree node and show the report on the same page

    Hi, I have created a tree for our organization and each node represents a unit. The top one is office level and followed by division and brach. I have created a reprot on the same page as the tree node. What I want to do is: I would like to click a s

  • Capacity Leveling - CM22 - Question

    Colleagues, We are using CM22 for performing capacity leveling functions. 1) In the standard system the Total capacity requirements (First column), are updated based on confirmation. We noticed that only confirmaton yield is posted, the capacity requ

  • Is there workaroud to eval() function?

    Flash animation consist of al lot of objects in library with exported names obj1, obj2, ... objN. Depending on user action some of this items may be created. Because there is necessity to create a couple of successive objects at once my intention is