Using MSGraph with CalendarView $Search OData Query Parameters - search

I am using the MSGraph SDK to retrieve Calendar events between two dates. I would like to extend that to also search the Subject and Body for matching text. Unfortunately CalendarView doesn't support body for the $filter, so I'm looking at $Search and OData Query Parameters.
The documentation says "some" ODate Query Paramters are supported, but I cannot find which ones when it comes to CalendarView.
When I try passing a $Search= parameter, I get all the events between the two dates returned, almost as if the $Search is being ignored.
This page:
List calendarView points to Use query parameters to customize responses which has the following text
To know the OData system query options that an API and its properties support, see the Properties table in the resource page, and the Optional query parameters section of the LIST and GET operations for the API.
Does anyone know the document this is referring to, I cannot find it.
Does anyone know how to search body with CalendarView?
Thank you

Related

Acumatica REST API - StockItem - how to use multiple product id in request

I am using the Acumatica REST endpoint https://companyName/AcumaticaERP/entity/Default/6.00.001 in my application
I am using the URL https://companyName/AcumaticaERP/entity/Default/6.00.001/StockItem?$filter=InventoryID eq '123456'&$expand=WarehouseDetails to fetch info about a Product and to get complete warehouse details
My query is how to use multiple product id's in single request, so that to get info about multiple products in single request to Acumatica Erp REST Url.
You can either use a generic GET request in order to have a list of all the records in that entity, you can append a specific ID at the end to select a single entity or you can use filters in order to restrict that list.
you might want to take a look at the following article from the Acumatica Help section:
Parameters for Retrieving Records :
https://help-2018r2.acumatica.com/(W(3))/Help?ScreenId=ShowWiki&pageid=c5e2f36a-0971-4b33-b127-3c3fe14106ff
but basically you will need to use different condition than "eq" in order to match more value. Even though there is no "in" condition

Search for multiple attributes with forge viewer

The AutoDesk Forge Viewer has a search function that takes in a search text, callbacks and an array of attributes to look at:
but what I want to do is search for a certain value in the "Level" attribute and a certain value in the "Category"-attribute of element at the same time.
Is this possible with the existing search-function or am I missing something in the API?
Cannot be done, the search feature in the viewer API is pretty basic, will let you search a text only in the property values and you cannot use combined queries ... The best suggestion for what you are looking for would be to read all the properties, which can be done using Model Derivatives API (see /GET :urn/metadata/:guid/properties endpoint) and store those in your own database/system, where they can be indexed and exposed through a more powerful query mechanism. Sorry for the bad news ...

Can I "Exact Search" for targeted field(s) and Search across other fields as well?

The "Exact Search" fields use their own custom analyzer, while the Search fields use a language specific custom analyzer (built on MicrosoftStemmingTokenizerLanguage.French, for example).
I can't seem to use $filter for the "Exact Search" field, because $filter considers the entire field, and doesn't use the custom analyzer of the field.
Azure Search docs indicate this about field scoped queries.
"You can specify a fieldname:searchterm construction to define a fielded query operation, where the field is a single word, and the search term is also a single word"
There is no clear way on how to do this in Azure. We know we can use the searchFields parameter in our Azure Search Rest API calls to target specific fields, but how do we search ALL fields for 1 term while specifically searching some fields for specific terms, basically doing an “AND” between them?
This is possible using the Lucene query syntax.
Construct your query like this, where "chair" is the term to search for in all fields, and field1 and field2 are fields where you want to search for specific terms:
chair AND field1:something AND field2:else
In terms of how you use this in the REST API, just embed it in your search parameter. If you're using GET it looks like this (imagine it URL-encoded):
search=chair AND field1:something AND field2:else
If you're using POST, it goes in the request body and looks like this:
{
"search": "chair AND field1:something AND field2:else",
... (other parameters)
}

Venues/SuggestCompletion doesn't give any results

I know for a fact that there are atleast 5-6 POI within the 50 mile radius in this area. However, I don't get any results on this query.
https://api.foursquare.com/v2/venues/suggestCompletion?ll=-44.67,167.92&query=milford&radius=50000
I see results when I try search api (it doesnt use query as mentioned in documentation):
https://api.foursquare.com/v2/venues/search?ll=-44.67,167.92&intent=checkin&query=milford&radius=50000
No results with intent match on the search query.
I really like the suggestcompletion api (compact). Any suggestion/input would be great?
Thanks!
The suggestcompletion endpoint is used to suggest venues whose names start with the provided query. The endpoint is used to provide autocomplete results for search input fields. It is not used as a general purpose venue search - you should use the /venues/search endpoint for this purpose.
looks like you have missed out the API version param. You need to denote it by adding this into your request :
&v=20150826
suggestCompletion is included into newer API released on 20150826 which differs from default one that not including suggestCompletion feature.

SharePoint returns extra system columns

I do query to SherePoint. I have created query, viewquery and query options.
Web services returns me great results, but it include some other system columns such as:
ows_Modified , ows_DocIcon, ows_Editor. I don't want them. How do I return only those which is in ViewQuery string?
My queryoptions is:
#"<QueryOptions>
<IncludeMandatoryColumns>False</IncludeMandatoryColumns><ViewAttributes Scope='Recursive' />
</QueryOptions>";
Thanks!
In order to return only selected columns (and not all of them) use ViewFields property of SPQuery object. You can find some more information about it and a sample code here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.viewfields.aspx.
In order to do it from javascript, you can try code as written here (that post is on another topic, but it still shows how to specify fields to select): https://sharepoint.stackexchange.com/questions/33683/spservices-today-not-returning-correct-results.

Resources