Sharepoint 2010 use fulltextsearch query to search user profile

Hello all,
I have a problem with FullTextSearch query for user profile:
I have the query below:
SELECT PictureURL, TitleOfPersonal, PersonalTitle,  Lastname, Firstname, AccountName, JobTitle, Department, workemail, EmployeeID, Empid, Exten, LeftDate, JoinDate
FROM SCOPE() WHERE "scope"='People' AND (Department = 'CEO Office' OR Department = 'Marketing & Business Development Department' OR Department = 'Medical Department' OR Department = 'Finance Department' OR Department = 'COO Office' OR Department
= 'Document Management & Translation Department') AND  empID != '' ORDER BY LastName
But this query does not return any result! 
Could someone help me on this ?
Thank you very much !

Hi,
According to your post, my understanding is that you want to search user profile using FullTextSqlQuery.
Please try to use the query below:
SELECT PictureURL, TitleOfPersonal, PersonalTitle, Lastname, Firstname, AccountName, JobTitle, Department, workemail, EmployeeID, Empid, Exten, LeftDate, JoinDate
FROM SCOPE() WHERE "scope"='People'
If the query works, please use CONTAINS(DEPARTMENT,'<value>') instead of
Department = '<value>' .
Here is a discussion for you to take a look at.
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/880086f7-5a54-454b-80c5-a676df19d83c/sharepoint-2010-fulltextsqlquery-query-problem-with-where-condition?forum=sharepointdevelopmentprevious
If there still no result returns, please provide more code for further research.
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • To extract the users permission on files and folders in sharepoint 2010 using client object model

    To extract the users permission on files and folders in sharepoint 2010 using client object model

    Hello,
    This is sample code to get item level permisison: (Just written in notepad so it is not tested)
    public void ItemLevelPermission()
    SecurableObject curObj = null;
    ListItem curItem = ctx.Web.Lists.GetByTitle("LibraryName").GetItemById(ItemId); -> Use Id of file or folder.
    IEnumerable roles = null;
    roles = ctx.LoadQuery(
    curObj.RoleAssignments.Include(
    roleAsg => roleAsg.Member,
    roleAsg => roleAsg.RoleDefinitionBindings.Include(
    roleDef => roleDef.Name, // for each role definition, include roleDef’s Name
    roleDef => roleDef.Description)));
    ctx.ExecuteQuery();
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Setting the default value to taxonomy column in sharepoint 2010 using client object model

    I am creating a metadata column and I want to set its default value in sharepoint 2010 using client object model. Can anyone help me?
    My code for creating metadata column is as below:
                ClientContext clientContext = new ClientContext(siteUrl);
                Web site = clientContext.Web;
                List list = site.Lists.GetByTitle("LibraryName");
                FieldCollection collField = list.Fields;
                string fieldSchema = "<Field Type='TaxonomyFieldType' DisplayName='SoftwareColumn' Name='SoftwareColumn' />";
                collField.AddFieldAsXml(fieldSchema, true, AddFieldOptions.DefaultValue);
                //oneField.DefaultValue = "ASP.NET|4c984b91-b308-4884-b1f1-aee5d7ed58b2"; // wssId[0].ToString() + ";#" + term.Name + "|" + term.Id.ToString().ToLower();
                clientContext.Load(collField);           
                clientContext.ExecuteQuery();

    Hi,
    Please try the code like this:
    ClientContext clientContext = new ClientContext("http://yoursite/");
    List list = clientContext.Web.Lists.GetByTitle("List1_mmsfield");
    clientContext.Load(list);
    clientContext.ExecuteQuery();
    FieldCollection fields = list.Fields;
    clientContext.Load(fields);
    clientContext.ExecuteQuery();
    Field f = fields.GetByTitle("mms");
    clientContext.Load(f);
    clientContext.ExecuteQuery();
    Console.WriteLine(f.Title + "---" + f.DefaultValue);
    //2;#A2|a0a95267-b758-4e4d-8c39-067069fd2eef
    //1;#A1|641f5726-992c-41c8-9ddc-204a60b88584
    f.DefaultValue = "1;#A1|641f5726-992c-41c8-9ddc-204a60b88584";
    f.Update();
    clientContext.Load(f);
    clientContext.ExecuteQuery();
    Console.WriteLine(f.Title + "---" + f.DefaultValue);
    Best regards
    Patrick Liang
    TechNet Community Support

  • Sharing of MS Office Documents in Sharepoint 2010 using Desktop Apps Not Consistent

    We have a Powerpoint File in Sharepoint 2010 that can be simultaneously edited by multiple users using the
    Desktop App.   I thought this functionality was only available with the
    Web App?   Does anyone know how this was enabled?  I would like to make this work for MS Excel but have never been able to make it work using the Excel Desktop App (only with the Web App).

    ncAllie,
    This feature is call "Co-Authoring".
    Require Check Out shouldn't enabled and version turn on, with permission will allow multiple user to edit same word/ppt/one-note in their respective zone.
    As per I know, excel client app don't support co-authoring(as you observed too), but OWA does
    Please go through -
    http://technet.microsoft.com/en-us/library/ff718249(v=office.15).aspx
    and Real-time co-authoring
    in the Excel Web App: Why and how we did it
    Hope it will clear some of your confusion.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to activate Custom Feature in SharePoint 2010 using Client Object model

    I am trying to Activate a custom feature using Client Object Model in SharePoint 2010. Here is the code I used. When I execute the code, I got the error "Feature with Id 'xx' is not installed in this farm, and cannot be added to this scope while
    creating site collection". Can anyone help?
    ClientContext clientContext = new ClientContext(spURL);
    //GUID of the custom feature                    
    Guid districtFeatureId = new Guid("5b3529de-5045-46da-af87-8d2e32c121a7");
    Site clientSite = clientContext.Site;
    FeatureCollection clientSiteFeatures = clientSite.Features;
    clientContext.Load(clientSiteFeatures);
    clientContext.ExecuteQuery();
    //Activate the feature
    clientSiteFeatures.Add(districtFeatureId, false, FeatureDefinitionScope.Site);
    clientContext.ExecuteQuery();

    Hi shil chan,
    When you activate a feature on the site collection, the feature should be scoped to site or farm, the error message shows it cannot find the specific feature, this will happen when you have a feature in web
    scope or the feature isn’t installed.  
    So, to troubleshooting this issue:
    Verify whether the feature is scoped to web. Please go to
    Site Setting->Site Features . If the feature is a web scope feature, then add the feature to webfeatures.
    Make sure the feature is installed correctly.
    Please inform me freely if you have any questions.
    Thanks

  • How to export Listitems in sharepoint 2010 using powershell

    I am able to export all items in sharepoint list by below command in powershell
    Export-SPWeb -Identity
    "http://myurl.com" -   path
    "C:\Export\Lists\Announcements.cmp" -ItemUrl
    "/Lists/Announcements/AllItems.aspx" -Force
    My list is having huge data in production I want to export only 10 items from the list using powershell. Is there any command to export only certain items.
    I want to filter the Items and export only certain set of items using Export command.
    Rajendra

    Hi all,
    To export a list you can try: 
    Export data from SharePoint 2010 List using Management Shell: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/A_9182-Export-data-from-SharePoint-2010-List-using-Management-Shell.html
    Export SharePoint 2010 List to Excel with PowerShell: http://iwillsharemypoint.blogspot.com.es/2011/02/export-sharepoint-2010-list-to-excel.html
    Export SharePoint List Items to CSV using PowerShell: http://www.sharepointdiary.com/2013/04/export-sharepoint-list-items-to-csv-using-powershell.html
    If a post answers your question, please click Mark As Answer on that post and
    Vote as Helpful

  • List of Project Permission in PS 2010 Using SQL query

    Hi
    Is there any way to get a list of Project permissions associated with user using sql query. If i go manually Project center --> select project plan --> project permission it would take lot of time to find out for each user
    Regards
    Santosh

    Before you continue (which you probably will overlook) - please understand that you should only be querying the REPORTING database and not the published database.  A recommendation is to use a select statement statement to insert the tables into a table
    int the reporting database, then query that table for your results/report.  
    The following page I believe has what you're looking for (Users with direct permissions- query below)
    and more
    http://pmpspecialists.com/Blog/2013/10/
    SELECT MSP_RESOURCES.RES_NAME AS Resourcename, CONV.CONV_STRING AS Permission, MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_DENY AS Denied,
    MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_ALLOW AS Allowed
    FROM MSP_WEB_SECURITY_SP_CAT_PERMISSIONS INNER JOIN
    MSP_WEB_SECURITY_SP_CAT_RELATIONS ON
    MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_REL_UID = MSP_WEB_SECURITY_SP_CAT_RELATIONS.WSEC_REL_UID INNER JOIN
    MSP_WEB_SECURITY_FEATURES_ACTIONS ON
    MSP_WEB_SECURITY_FEATURES_ACTIONS.WSEC_FEA_ACT_UID = MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_FEA_ACT_UID INNER JOIN
    MSP_WEB_CONVERSIONS AS CONV ON CONV.CONV_VALUE = MSP_WEB_SECURITY_FEATURES_ACTIONS.WSEC_FEA_ACT_NAME_ID INNER JOIN
    MSP_RESOURCES ON MSP_WEB_SECURITY_SP_CAT_RELATIONS.WSEC_SP_GUID = MSP_RESOURCES.RES_SECURITY_GUID
    WHERE (CONV.LANG_ID = 1033)
    ORDER BY Resourcename, Permission

  • SharePoint 2010 question about alert to external user

    Any ideas about how to implement an alert within SharePoint 2010 that would cause an alert to be sent to a user outside of one's organization when the value of an "Assigned To" column within a list is set to that external user's e-mail address?

    It should just work. Make sure to check your mail flow (e.g. Exchange server transport logs) to validate the mail is leaving the organization. Also make sure that the user that it is Assigned To has an email address assigned to them in the User Information
    List (for their User account).
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Integrate SAP Business Data Into SharePoint 2010 Using BCS & LINQ

    One of the core concepts of Business Connectivity Services (BCS) for SharePoint 2010 are the external content types. They are reusable metadata descriptions of connectivity information and behaviours (stereotyped operations) applied to external data. SharePoint offers developers several ways to create external content types and integrate them into the platform. The SharePoint Designer 2010, for instance, allows you to create and manage external content types that are stored in supported external systems. Such an external system could be SQL Server, WCF Data Service, or a .NET Assembly Connector.
    Interoperability between SAP NetWeaver Portal and Microsoft SharePoint technologies is a very important topic in many companies. This session will take you on a tour from basic considerations to specific implementations of interoperability between SAP NetWeaver Portal and Microsoft SharePoint technologies.
    [PLAY SESSION - INTEROPERABILITY BETWEEN SAP NETWEAVER PORTAL AND MICROSOFT SHAREPOINT TECHNOLOGY|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/media/streamingmedia/events/sap-teched-2010/lectures/pmc202%20interoperability%20between%20sap%20netweaver%20portal%20and%20microsoft%20sharepoint%20technology/index.html]

    No need to answer, this was general information content for users.

  • Cannot create list in SharePoint 2010 using Client Object Model

    I am trying to utilize SharePoint 2010 Client Object Model to create a List based on a custom template. Here's my code:
    public void MakeList(string title, string listTemplateGUID, int localeIdentifier)
    string message;
    string listUrl;
    List newList;
    Guid template;
    ListCreationInformation listInfo;
    Microsoft.SharePoint.Client.ListCollection lists;
    try
    listUrl = title.Replace(spaceChar, string.Empty);
    template = GetListTemplate((uint)localeIdentifier, listTemplateGUID);
    listInfo = new ListCreationInformation();
    listInfo.Url = listUrl;
    listInfo.Title = title;
    listInfo.Description = string.Empty;
    listInfo.TemplateFeatureId = template;
    listInfo.QuickLaunchOption = QuickLaunchOptions.On;
    clientContext.Load(site);
    clientContext.ExecuteQuery();
    lists = site.Lists;
    clientContext.Load(lists);
    clientContext.ExecuteQuery();
    newList = lists.Add(listInfo);
    clientContext.ExecuteQuery();
    catch (ServerException ex)
    Now, this particular part, newList = lists.Add(listInfo); clientContext.ExecuteQuery();, the one that is supposed to create the actual list, throws an exception:
    Message: Cannot complete this action. Please try again.
    ServerErrorCode: 2130239231
    ServerErrorTypeName: Microsoft.SharePoint.SPException
    Could anyone please help me realize what am I doing wrong? Thanks.

    I've made progress - well, at least to some extent. The previous message related to the "Invalid file name" is not appearing any more. I now realize that it is necessary to specify feature ID, list template kind, as well as custom schema in order
    to order SharePoint 2010 to create the document library. 
    However, there's a new problem which isn't documented on the net almost at all (at least I was unable to find anything): The document library gets created, but I cannot access it. Further inspection showed that the doc lib views are not created. Basically,
    the only accessible doc lib page is the document library settings page. Also, I get the server exception with the message: 
    Server Out Of Memory. There is no memory on the server to run your program. Please contact your administrator with this problem.
    Any idea what is causing this issue? Thanks. 
    Hi Boris
    Borenović,
    I think I found the reason for this notorious "Server Out Of Memory" error.
    (Man, it took 4 hrs of frustrating troubleshooting without any direct hints... very disappointing
    MSFT developers :( ).
    Anyway,
    All the "Form" elements at the bottom need to have SetupPath="pages\form.aspx"
    attribute (by default this attrib is missing when you copy the whole List element from inside the stp's manifest.xml  file).
    Also, just make sure that each "View" element has correct "WebPartZoneID", "SetupPath" and "Url" attribute values otherwise that list/library will
    be created successfully but will fail to load when you try to access it (with the VERY helpful "Cannot complete this action, contact administrator" error). Even if you enable stack trace (or check ULS logs) you will find "An unexpected
    error has been encountered in this Web Part.  Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe." and you will never realize it's because of the
    incorrect attributes ("WebPartZoneID", "SetupPath" or "Url" as mentioned above).
    Come on Microsoft, you can do better than that?
    If the API needs this attrib then why is it missing inside the manifest.xml file when
    an STP file generated in the first place?

  • Anyone tried using LDIF file in the User Profile Synchronization Process?

    Microsoft pushied an article recently talking about using LDIF file in the SharePoint's user profile synchronization. 
    Configure profile synchronization using a Lightweight Directory Interchange Format (LDIF) file (SharePoint Server 2010) http://technet.microsoft.com/en-us/library/ff959234.aspx
    Currently I am unable to obtain the required "Replicate Directory Change" permission set up by the AD admin.  So I thought of exploring this alternative since I still have AD search permission right now.
    So far, I was able to set up the MOSSLDAP-LDIFMA, and use an import.ldif file to add, remove and update user profiles.  However, there are some problems that I can't resolve.  One of key problems is, the LDIF-imported records can't be
    sync'd with login-based records.
    In my environment, when a user login SharePoint via Windows authentication, a new profile would be added, under the account name "domain\username".  Meanwhile, when an LDIF record imported, there will be another profile created under the account
    name "domain:domain\username", or "domain:username".  That is, there would be two profiles for each user.
    Based on my understanding, it is very likely the user profile synchronization is based on the user's account name.  But in document and sample files provided, I can't find out any clue how to prepare the ldif file so that it will update the
    matching records, instead of creating new ones.
    Any help?  Thanks in advance.

    Has anyone managed to get this to work?
    It's nice that Microsoft offers the ability to import user profiles via LDIF into SharePoint, but it is useless if the account name is not correct after the import. I have tried multiple imports from the LDIF to get a user account to show up as  "domain\username" but
    it always ends up as "domain:domain\username", or "domain:username".  or a variation
    of these 2 with a colon separating the domain form the username. i see that multiple people have had the same problem, but unfortunetaly can't seem to find a solution. Also I see Bradley mentions that he was able to import accounts using get-QADUser,
    but he doesnt mention what the accounts import as or if it resolved the domain colon issue.
    Thanks in advance for any help or information anyone can provide.
    cheers,
    Zed

  • Search User Profiles without MySites

    We upgraded from 2007 to 2010 last year. In 2010 we did not set up a MySite web app or top level site collection. We did set up the User Profile Service and the profiles are syncing data from AD correctly. I have two issues that I would like help resolving.
    First, I would like to set up a search where we can search for people and get their profile information. I want to use this like a company directory. I don't want to use the site collection user list, I want the profile information instead because the site
    collection user list does not contain all of our users. If I don't have MySite, what do I set the crawl to?  Where are the profiles stored?
    Second, in a site collection, when we click on the name of the user under "created by" or "modified by", we get a page not found.  I'm not sure if that is supposed to link to the profile (which I think is person.aspx) or the site
    collection user (userdisp.aspx). 
    Are both of these issues caused by not having a MySite application set up?  Is there anyway to have and use profiles without having them in the MySite app and site collection?  I would like users to be able to modify their profile and we'd like
    to search them.  I'd also like those links under created/modified by to link to something.  I've read about 50 articles and books and can't find a definitive answer on needing/not needing MySite. Any help is much appreciated.
    Milissa Hartwell

    I was able to resolve my crawl issue. I set up a separate content type (not sure if a separate one was needed, but that's how I did it). The crawl was set for sps3://[myservername].  Once the crawl was complete, I was able to search for people in my
    search center.
    My userdisp and person.aspx are still not coming up.  When I click on a user in the site collection, I'm expecting to see their info in the userdisp.aspx page but I still get a page not found.  And after I search for people, if I hover over
    their name, the URL shows
    http://[myserver]/my/person.aspx?accountname=[accountname] but I also get a page not found.
    Does anyone know how to get userdisp and/or person.aspx to render?  I looked in my 14 hive on the server and the userdisp.aspx page does exist so I'm not sure why it won't come up at least.
    Also still wondering if users need a mySite to edit their Profile.
    Milissa Hartwell

  • Project Server 2010: We want to create the User Profile Service but it keeps hanging when attempted from Central Administration. Any PowerShell commands to do this instead?

    We want to create the User Profile service in Project Service 2010. Are there any PowerShell commands that can be used to achieve this?
    Thanks in advance.

    Hello,
    See the links below for examples:
    http://www.harbar.net/archive/2010/10/30/avoiding-the-default-schema-issue-when-creating-the-user-profile.aspx
    http://thesharepointfarm.com/2011/03/configuring-user-profile-service-and-user-profile-synchronization-service-via-powershell/
    http://blogs.msdn.com/b/rcormier/archive/2012/05/10/how-to-create-a-sharepoint-user-profile-service-application-with-powershell.aspx
    I'd also review this is if it is stuck starting:
    http://www.harbar.net/articles/sp2010ups2.aspx
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Use old domain controller AD user profile with new domain (profile changed)

    Dear All,
    I have built Win Server 2012 for Domain migration from Windows Server 2003 to Windows Server 2012. I have tested all thing on VMware including user creation and tested Domain join using power shell for Win 7 and .VBs batch file for Win XP computers all thing
    are working fine.
    Let 1st I introduce my current environment. I have existing Win Server 2003 domain controller (abc.com) with 130 client computers and 200 users I am going to plan migrate my current environment to Win server 2012 Domain (xyz.com) Keep in mind that Domain
    name is changed but Domain Controller (Server) names are same i.e MY-PDC . I have tested domain join on multiple computers using existing clone of client computers and create all existing users using .csv file and power shell with required
    credentials and OU.I am facing the user profile issue when I join domain and login with existing user which was previously the user of same computer the required profile does not login and computer creates new user profile in Document and Settings section
    of Win XP.
    I need your expert opinions because copy old profile data and create new outlook profile for each user is a big headache for any one. Hope you people can understand and help me in this issue.
    Please provide best answer and result on priority I will be thankful to all of you.
    Regards,
    Arsalan

    Hi Arsalan,
    Please check if USMT can help you to achieve this target.
    User State Migration Tool 4.0 User's
    Guide
    Meanwhile, please also refer to following articles and check if can help you.
    How
    to Migrate Windows User Profile to New Account
    Keeping user old domain profile
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft
    does not guarantee the accuracy of this information.
    If anything I misunderstand or any update, please don’t hesitate to let us know.
    Hope this helps.
    Best regards,
    Justin Gu

  • Why can i not use 1 macbook with 2 user profiles and 2 iTunes match accounts

    Hi All,
    It seems to me like a bizzare occurance that the Mac O/S caters for mulitple user profiles on one machine and iTunes allows for mulitple users to have seperate libraries on one machine but I cannot use one Mac for itunes Match.
    My wife and I share the same mac, we have an iTunes account each and seperate music libraries but I cannot use her iTunes match as it will lock me out for 90 days on my iTunes match.
    This is crazy? am i missing something.
    Many thanks
    Andrew

    Amurphy101 wrote:
    This is crazy? am i missing something.
    You are not missng anything.  That's the wy it is as explained here: 
    Tunes Store: Associating a device or computer to your Apple ID, http://support.apple.com/kb/ht4627
    You won't find an explanation as to why this restriction exists.  You can voice your feedback to Apple here:  http://www.apple.com/feedback/itunesapp.html

Maybe you are looking for

  • In Mail, how can I tell if an email has been read by the recipient?

    There used to be a way in msn to get a message when an email was read. Is there a way to do the same in Mail?

  • Oracle 9i in UNIX (AIX)

    Hi, I am new to the UNIX environment. We are installing a 9i suite in a UNIX (AIX) box. Is there anyway I can use the Enterprise Manager console in this machine? or do I have to use x-windows? How can I access the database remotely from my windows xp

  • Zipping

    have a requirement to programmatically create a zip file and set password for the same. am aware how to create zip file using java.lang.zip. but can password be set for the said file programmatically? is there a way at all? any light please? thanks

  • Ethernet connection between OS 10.3.9 and OS 9Imac

    Is it possible to directly connect, with an ethernet cable, a powerbook G4 running OS 10.3.9 to an Imac running OS 9.2? When I try, from the Imac, I can see the powerbook under chooser>appleshare. However when I try to log on, a message saying "the c

  • Premiere Pro has encountered an error. [/ppro801/releases...

    Hello, It seems my Premiere Pro CC 2014 has encountered a fatal error. Whenever I try to make a an edit to the timeline the following message appears: I am currently using a Mac OS X Version 10.9.3 with a 3.5 GHz 6-Core Intel Xeon E5. It's memory is