Person search to metadata field with search REST API on SP2013 online

Hi!
I'm developing a sandbox solution to be deloyed on SharePoint 2013 online. This solution contains a web part for a custom functionality. I have a need to make a query against data in user profiles based on two custom metadata properties (mapped to termsets).
Is it possible to create this kind of query by using search REST API (with javascript)? So I need all persons whos metadata field
MyOwnTerms contains specific value(s) passed to search?
I can get all users with /_api/search/query?querytext='*'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'very (if i set the rowlimit to very high) and the results contains my cystom field
MyOwnTerms but there is too much of results to loop through just for filtering. I cannot reduce rowlimit because I need ALL the persons with certain metadata value in this field. Is there any way to make this work?
.Ana

I went through the same problem and yes it is possible. In my case, I created a Managed Properties specific to my site column metadata, and assign the value only the label of the column metadata for this managed property. So it returns only the value of
the name and not the metadata ID | Name as the default. 
So, just move on selectproperties the name of your managed metadata, so it returns the correct value.

Similar Messages

  • How to use search REST api to get custom managed property data for anonymous user?

     
    I am trying build a public portal with anonymous access and i am trying to read some
    content from custom managed property using search REST api in sharepoint 2013. I have tried to enable all possible attributes of the managed prop. Like searchable,queryable,safe etc. also i am including queryparametertemplate in my REST api search query. But
    still i am not able to retrieve the managed prop. For an anonymous user. The same query returns the value if i am logged in.
    Any Help is greatly appreciated. 
    Thanks,
    Rakesh
    Thanks, Rakesh

    Hi Rakesh,
    To enable anonymous Search REST queries, we need to create queryparametertemplate.xml and upload it to the correct library in SharePoint.
    From your description I can know that you have created the file, then I recommend to check the things below:
    Please use “QueryTemplatePropertiesUrl” instead of “queryparametertemplate” in the Search REST API query as following: &QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml'.
    Make sure that the Query Properties you need have been added to the QueryProperties element in the queryparametertemplate.xml file.
    Make sure that the query parameters you need have been added to the WhiteList element in the
    queryparametertemplate.xml file. For example, if you want to use Refiners in the REST API, then the Refiners should be added to the
    WhiteList element in the queryparametertemplate.xml file as following:
    <a:string>Refiners</a:string>.
    You can also debug setting properties in anonymous Search Rest queries following the link below:
    http://www.mavention.com/blog/debugging-setting-properties-anonymous-search-rest-queries
    More references about anonymous Search REST:
    http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/
    http://msdn.microsoft.com/en-us/library/office/jj163876%28v=office.15%29.aspx#bk_AnonymousREST
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Search REST API - Usage reports

    Hi,
    We use the Search REST API to execute queries. 
    The Usage reports on the Site Collection under Popularity and Search Reports do not contain any data.
    Is there a way to get usage data for queries executed by the REST API?
    Best regards,
    Christoffer Vig

    You suggest running queries directly against the SP log database? I see it described at http://technet.microsoft.com/en-us/library/hh769359(v=office.14).aspx as well.
    I always thought this was strictly prohibited in a production environment and will void warranty, but is the logging database an exception to this?
    Thanks,
    Mikael Svenson
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • How to write FQL in querytext field in SharePoint 2013 Search REST API?

    I am having double quote symbol issue in my search app, same as http://www.silver-it.com/node/127 says.
    To avoid this issue, I am trying to understand: is it possible to do search request in FQL to the 2013 Search REST web service?
    I know that we can use KQL in querytext, like
    http://sp2013/sites/search/_api/search/query?querytext='Title:"123#123"'&enablefql=false&rowlimit=100&selectproperties='Title'
    But is it possible to write it in FQL? I found that there is a enableFQL property we can set in REST API. What's the function of it?
    http://sp2013/sites/search/_api/search/query?querytext='test'&enablefql=true&rowlimit=100&selectproperties='Title'
    http://sp2013/sites/search/_api/search/query?querytext='string("test case",mode="simpleall")'&enablefql=true&rowlimit=100&selectproperties='Title'
    Right now, the two above requests just give me this error.
    HTTP/1.1 500 Internal Server Error
    {"error":{"code":"-1, Microsoft.Office.Server.Search.REST.SearchServiceException","message":{"lang":"en-US","value":"We didn't understand your search terms. Make sure they're using proper
    syntax."},"innererror":{"message":"We didn't understand your search terms. Make sure they're using proper syntax

    http://sp2013/sites/Search/_api/search/query?querytext='string("cat+dog+fox",+mode="and")'&enablefql=true&rowlimit=100&selectproperties='Title'&sourceid='ad5a2ca4%2D91eb%2D44de%2D98f7%2D9af1c1eefef3'
    The response is:
    HTTP/1.1 400 Bad Request
    {"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."},"innererror":{"message":"Guid should contain 32 digits with
    4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).","type":"Microsoft.SharePoint.Client.InvalidClientQueryException","stacktrace":"   at Microsoft.SharePoint.Client.Rest.EdmClientValue.ConvertTo[T]()\r\n   at Microsoft.Office.Server.Search.REST.SearchServiceServerStub.query_MethodProxy(SearchService
    target, ClientValueCollection xmlargs, ProxyContext proxyContext)\r\n   at Microsoft.Office.Server.Search.REST.SearchServiceServerStub.InvokeMethod(Object target, String methodName, ClientValueCollection xmlargs, ProxyContext proxyContext, Boolean&
    isVoid)\r\n   at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, ClientValueCollection args, ProxyContext proxyContext, Boolean& isVoid)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.InvokeMethod(Boolean
    mainRequestPath, Object value, ServerStub serverProxy, EdmParserNode node, Boolean resourceEndpoint, MethodInformation methodInfo, Boolean isExtensionMethod, Boolean isIndexerMethod)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPathMember(Boolean
    mainRequestPath, String path, Object value, EdmParserNode node, Boolean resourceEndpoint, MethodInformation& methodInfo)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPath(Boolean mainRequestPath, String path, String
    pathForErrorMessage)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()\r\n   at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream
    inputStream, IList`1 pendingDisposableContainer)"}}}

  • Query a document library using Search Rest API

    How can we search for a specific document library using SharePoint Search through Rest API? We have a couple of document libraries which have thousands of documents with its relevant metadata information stored. We need to create an app to search through
    these document libraries and display the document and its metadata. Can someone point me in the right direction?
    V

    Taking what Shakir said you would substitute queryText with a managed property query (KQL) to query against metadata from the Document library. So if your document library has a Owner column then you would either create or use an existing managed property
    defined in the Search Schema. So your query may look like this:
    https://<site URL>/_api/search/query?querytext='(owner:smith)+AND+(path:<library url>)'
    Link:
    https://msdn.microsoft.com/en-us/library/office/ee558911.aspx?f=255&MSPPError=-2147217396
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Custom metadata field with autonumbering sequence

    I have created a custom metadata field and I need it to be able to start a zero and then increase by one with each checkin. There were other qualifications for this particular field as well, which I have managed to do. Currently, the field is V99_99999 where V is a constant, and the 99 immendiately after the V is the current two digit year. all that works great. the issue I am having is with the second half of this. I have it going against the content_id currently, which is at 003856 right now, so when I check in my first content, it will look like V09_003857. what I need it to look like is V09_00001 and then increase by one with each checkin, and then for the really tricky part...when the year changes, on Jan 1, the counter needs to start over at all zeroes again.
    I am fairly new to UCM and this seems huge to me. I purchased a book called "The Definitive Guide to Stelelnt Content Server Development" hoping to find the answer, but am still struggling, so I am using another life line and reaching out to you all.
    Thanks,
    Patti

    Interesting!
    You'll need a component. You already mentioned you had a custom metadata field. You will also need to add a counter to the counters table for your component. During a check in you will need to fetch the next value from the counters table, increment the counter and store the new number back in the table. The year portion of the id is easy, get the current year and grab the last two characters. Then, put this all togther to get the data for your metadata field.
    The big question now is where in the check in process will you do all this? You will need something called filters probably. Maybe addFiles, maybe validateStandard, there are several that this could work with.
    Check out the how-to-components:
    http://www.oracle.com/technology/products/content-management/ucm/samples/index.html
    -Jason
    http://www.corecontentonly.com

  • Custom metadata field with date filtering like built-in Date field

    I've added a custom metadata field OK and now want to add an additional custom metadata field that contains the date the photos were exported by my plugin.  The types of metadata values don't include a date field.
    I've tried using a string with the value returned by os.date() and that does indeed add the date and time but what I'm really looking for is a way to add a date field so it will have the same behaviour that the built-in Date field does. 
    When I use Library Filter: Metadata, the Date column shows the date with a series of disclosure buttons in a hierarchy, e.g.,
    Date
    All (1 Date)
    V 2009
       V November
          V 27-Friday
    Is this some magic for the built-in field or is there some way of formatting the date so Lightroom knows it's a date and can treat it the same way as the built-in date?
    Abe

    Thanks.  I've just added a date string.  It's not an ideal solution but it's the best I can manage at this time.  Maybe in LR3.
    Abe

  • Set metadata field with current user

    I would like to have a Response that would set a field with the current logged in user. (This would be triggered by a Subscription)
    I am using a Response Action of "Set Asset Metadata".
    I have tried entering:
    [Name]
    [USER_NAME]
    [Username]
    and so on but the field just puts in the text not the user. Is it not possible to copy from one metadata field to another in a Response Action?

    Variable insertions only work for fields that are part of the Asset, Production, or Job that is triggering the Subscription. The only one of those that would reference a user is a Job Subscription. Jobs have a field called \[Owner] that lists the user that caused the job to happen. Of course, this is only viable for actions that cause a job to occur, such as downloads, exports, analysis, archive, or recovery.
    Unfortunately, Set Asset MD will not be of any use in a Job Subscription since there is no asset to set metadata upon when you are subscribing to a job. Long story short, you will not be able to do what you are describing automatically.

  • Mandatory custom metadata field with current system date as default value.

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date.
    I have already created field of type Date. What expression I should write to make system date as default value?
    Because its a mandatory field, what would happen to existing content. Will there metadata get updated?
    Thanks
    Sanjeev

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date.
    I have already created field of type Date. What expression I should write to make system date as default value?
    See http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c08_config_ref.htm#CSIDO710
    >
    Because its a mandatory field, what would happen to existing content. Will there metadata get updated?No, it will not be updated - profiles are active only for new or updated items (in fact, they work on front-end).
    >
    Thanks
    Sanjeev

  • How to fetch all the contact fields using Office365 REST API

    When I request for Contacts using webservices URL, Office365 returns only some specific fields (even though contact record has lot more fields). Is there any way so that I can fetch all the fields in contact record?

    Currently the REST APIs are limited to the fields you see now. We're constantly working to add more features though, so that might come in the future.

  • Automatically populate metadata field with file name?

    Hi, I'm not sure if this is possible...
    I'm working with many large batches of .jpg files, and am running them through Bridge in order to add metadata according to my client's guidelines.
    For every single file, my client requires that the "Description" field in the IPTC Core section of the metadata is filled with the full filename, as it would appear in the Finder, including the .jpg extension.
    Currently I'm copying every file's name and pasting it into the Description field. Does anyone know of a good way to automate this task? Since each file name is different, a standard metadata template isn't meeting my needs.
    If anyone knows of a good way, I'd be very glad to know! Thank you.
    Chad
    Adobe Bridge CC 6.0.1.6  /  Mac OS X 10.9.1

    Awesome, That works really well.
    I found this on the forum based on your answer.
    Puts the file name in the field and takes off the .pdf extention.
    var
    fileName = event.target.documentFileName;
    //removing the file extensionvar vDot = fileName.length-4;
    //apply the value to the TxtFieldthis.rawValue= fileName.substring(0,vDot);

  • Person or Group MetaData Field not saving

    I have a document library with a custom content type
    This DL has 2 Person or Group Meta Data Fields
    I created a simple workflow so that the people on these 2 fields get notified when an item is created or modified. 
    However; for some reason, when I create a new document set of this content type 
    The person fields dont save any information
    I can edit and reenter the info and it saves it but no workflow emails go out. 
    I am using Sharepoint Online on a E3 plan. 
    Please help
    Thanks
    Tanya

    Hi,
    I have done a test on my SharePoint online, I can’t reprocess your issue.
    I added a custom content type in a document library which has 2 Person or Group Fields.
    Then opened the document library with SharePoint Designer 2013, created an approval workflow as the following screenshot:
    I  selected that starting the workflow when an item is created or modified.
    When I created or modified an item in the document library, the people on these 2 fields got emails 
    automatically.
    For your issue, make sure the  people have correct email addresses.
    Please follow my method and test again.
    Hope it helpful.
    Best Regards,
    Lisa Chen

  • Tildes in Field Names for REST API

    In spanish, the term "Description" is translated as "Descripción".
    So, I have a field name 'Descripción' in a SharePoint List. Internally, Sharepoint stores the name as 'Descripci_x00f3_n'. Ok.
    But I don't know why I can't search by this field using any of the following URI's:
    http://myhost:myport/_api/Web/Lists/GetByTitle('myList')/Items?$filter=Descripci_x00f3_n eq 'sometext'
    http://myhost:myport/_api/Web/Lists/GetByTitle('myList')/Items?$filter=Descripci%f3n eq 'sometext'
    http://myhost:myport/_api/Web/Lists/GetByTitle('myList')/Items?$filter=Descripción eq 'sometext'
    I obtain the same HTTP error: 400 Bad Request.
    any suggestions?

    Hi,
    Please use the following URI to check whether the issue would still occurs.
    http://myhost:myport/_api/Web/Lists/GetByTitle('myList')/Items
    If the issue wouldn’t occurs, use the following URI to try it, it working fine in my test environment.
    http://myhost:myport/_api/Web/Lists/GetByTitle('myList')/Items?$filter=Descripci%5Fx00f3%5Fn eq 'sometext' 
    You can also check the field type, use a text field to try it.  
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Custom fields with the same name in Project Online

    Today I discovered something interesting when creating custom fields in Project Online.
    I usually create a certain set of custom fields that are useful to have on both the project and the task level. An example of these is Reportable, which I use to determine which tasks to roll up into reports and also which projects overall to report on.
    So I created a project level custom field called Reportable. No problem.
    I then created a custom field on the task level called Reportable. And the computer said no!
    I then learned that although you could do this in Project Server 2013, you can't in Project Online. You can't have duplicate custom field names, even if they are of different types.
    This has led me to use a naming standard, such as Reportable Task and Reportable Project. But I really don't like that as codes are for computers, not us humans. So I hope this changes in the future, but for now you just need to think about how you approach
    the fields.
    Good luck!
    Ryan Darby
    National Manager PMO
    www.ipmo.com.au
    www.projectonline.com.au

    Hi Ryan,
    I would follow Ben on this..
    Just made a test on a Project 2013 instance on-premise and I cannot create a task ECF and a project ECF with the same name. The same test on a Online instance returns the same result: the ECF names must be unique whatever the entity is.
    Waiting for Ben's confirmation.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Can you retrieve  contact custom made fields with the BC API?

    I have added Custom Fields atatched to my Contact CRM
    I can ContactList_Retrieve the contacts list but would like to add the custom fields  attached to each contact..
    but so far had no success yet! Is it possible?

    Thanks Liam!
    Got them.
    Also is it possible  to retrieve contact list not with the last update date but created date?
    and can we pass a range date?
    as i have found that it is quite slow if you go back in time, as it downloads all the records until the present time.

Maybe you are looking for

  • Can you use 2 different on ipod on the same itunes?

    I'm asking because my sister is buying an ipod and wants to use it on my itunes but she doesn't want my library to be copied to her new ipod.

  • Syncing non iCloud tunes?

    I have a 4 hour radio program that I record every week.  Before iCloud I was able to sync the program to my iPad.  Since the program is too big to sync to iCloud I can no longer get it to sync or even show up in its own playlist.  That playlist is an

  • Nube trying to create class in netbeans

    My husband and I have missed class because of being sick. We are way behind on our lessons which began without us. I have done simple scripting and some visual basic but Java is way new to me. We are using NetBeans for editing. I would rather assume

  • Another problem with Forums

    Hey, Apart from the problem which Alvaro put up few days back, there is another big wrong-thing I observe on forums. There is lot of repitition of the questions. The same question is asked again and again. I request people to search through the forum

  • About backing up / restoring Arch

    Hi , My Arch X86_64 is installed onto a SSD, it's about 3 years old and I'm just moved to the mix systemd / sysV My purpose is to refresh the perf of the SSD with a secure erase (hdparm), however I don't feel like reinstalling the whole Arch. So I'm