Is your sandbox (https://developers.google.com/drive/v2/reference/files/list) not working properly or am I doing this wrong?
Here's the parameters I'm putting in for q--
'[folderid]' in parents and name contains '[document name]'
^^ folderId and document name are of course replaced with actual things (no brackets) in my search.
Any idea what's going wrong?
Help is greatly appreciated. Thank you!
The problem with your query is the "name" keyword, not "and".
For some reason, in v2, the query textfield for Try It Yourself does not accept "name" keyword. It always returns error "The value of the parameter 'q' is invalid."
But, I noticed that if you changed 'name' with 'fullText', like:
'folderid' in parents and fullText contains 'Android'
then it works. The query is accepted.
However, this seems to have been fixed in Drive v3. In v3,"name" is accepted query keyword. Thus,
'folderid' in parents and name contains 'Android'
works like a charm.
Related
object.document.getElementsByTagName("frame")(0).contentDocument.getElementById("ID").Value ="abc"
object.document.getElementsByTagName("frame")(0).document.getElementById("ID").Value ="abc"
When I use two codes mentioned above, it shows the error message "NULL REFERENCE"
But when I use 3rd code which is mentioned below, it is running fine.
object.document.getElementsByTagName("frame")(0).Document.getElementById("ID").Value ="abc"
But in this case when I write it in macro, then "Document" becomes "document" and shows the null reference error.
object.document.getElementsByTagName("frame")(0).Document.getElementById("ID").Value ="abc"
becomes to
object.document.getElementsByTagName("frame")(0).document.getElementById("ID").Value ="abc"
Please help. Thanks in advance.
How to use search and filter in the same query?
String url = "https://outlook.office.com/api/v2.0/me/messages?$filter=ReceivedDateTime ge 2016-02-22&$select=Subject,From,Body,ReceivedDateTime&$search=\"subject:(Chris Brown OR Michael Jackson)\"";
I need to find all mails with Subject having either "Chris Brown" or "Michael Jackson" and mail received date after 22nd Feb, 2016. Also it should have Subject, From, Body, ReceivedDateTime in the REST response.
Could anyone please help?
FYI - I am getting output if it has either filter or search. But when given together, I am getting a "Bad Request" error.
Right now this is not supported. From Use OData query parameters:
You cannot use $filter or $orderby in a search request.
So, the only way to do this is to perform a search via a query, and then filter on the client; or vice versa.
Update
In this particular case, since subject is filtrable and supposedly you only need an exact subject match (and not 'contains' for example), you can use something along the lines of:
https://outlook.office.com/api/v2.0/me/messages?$filter=(ReceivedDateTime ge 2016-02-22) and ((subject eq 'Chris Brown') or (subject eq 'Michael Jackson'))
To answer the original question: yes it is possible. #roman-pletnev correctly pointed out that you cannot use $filter or $orderby in a $search request. However, you can achieve the desired result using just $search.
$search="
(subject:(Chris Brown) OR subject:(Michael Jackson))
AND (received:02/22/2016..10/21/2016)
"
Note that extra linebreaks have been included for readability.
Also note that the received parameter seems to only work with a single date, or a specific range. I.e. you cannot request "everything after 02/22/2016". Instead you have to input today's date (or a future date?) as the end of the range.
received:<date>
received:02/22/2016
received:<start>..<end>
received:02/22/2016..10/21/2016
I'm not 100% sure about the date format. I don't know if it's determined by your account's locale or if it's always MM/DD/YYYY.
Other variations seem to work as well. However, the documentation for this is very bad and most of the documented syntax for "received" doesn't seem to work. I've filed a support ticket with Microsoft regarding this.
Some other documented syntax does work, for example received:today
Some documented syntax does not work, for example received:October
References:
https://support.office.com/en-us/article/Learn-to-narrow-your-search-criteria-for-better-searches-in-Outlook-d824d1e9-a255-4c8a-8553-276fb895a8da
https://support.office.com/en-us/article/Search-Mail-and-People-in-Outlook-on-the-web-for-business-88108edf-028e-4306-b87e-7400bbb40aa7
https://msonlinehelpdesk.zendesk.com/hc/en-us/articles/200561417-Learn-how-to-fine-tune-email-search-results-in-Outlook-and-Outlook-Web-App-OWA-
I am running into an issue where URL with querystring parameters separated by & is not getting resolved correctly.
Can anyone please guide on this?
For instance -
consider url
https://www.google.com/?gws_rd#q=Pune&tbm=news resolves to 'news' tab
but https://www.google.com/? gws_rd#q=Pune&tbm=news lands on 'All' tab of google.
Thanks in advance.
The # character indicates the end of the query string and the start of the fragment identifier.
You have to escape it (as %23) if you want it to appear as data.
I'm using google places api, but it returns the value with different place_id.
I have considered this blog : https://developers.google.com/places/documentation/search
I have requested with place id like this :
https://maps.googleapis.com/maps/api/place/details/json?key=AAIS...
In this url, you can see that the place_id is "EiJ..."
But in the returning json, i have received different place_id.
"place_id" : "AASS...",
"reference" : "df..."
When I have tried with reference, it was the same.
What did I wrong?
Is this the same location with different place_id?
Thanks for your help...
1) Never post your API key on a public forum. Go get yourself a new one.
2) reference has been deprecated, so you don't need to include it
3) EiJG... doesn't look like a Placeid. My guess is that you are trying to look up a value that doesn't exist and you're getting strange behavior.
Run a Place Search and get the Placeid and try again. You haven't posted what you searched for initially so it's impossible to verify that EiJ... really is a valid Placeid.
You can also have more than one place ID associated with a particular place.
In that case, if you request details using one place ID, you can get another ID back (you used the alternate ID, it returns what it considers the primary).
I found your question how to deal with this because I'll be storing information using their primary key and if it changes it will cause issues since the ID initially comes from their search (I'll get the new ID and not realize it is associated with the information I stored).
File query returns no result when searching for a number in a title. For example, if file title is "File.123", then search query "title contains 'File'" is successful, but query "title contains '123'" is not.
The problem can be easily reproduced in API explorer.
Also. the IndexableText field is no longer searchable, i.e. queries return no results when searching for values in that field.
Thank you.
My mistake. It seems that search is searching for whole words, and not for character sequences. So, 123 would never be found. If file name was "File 123" then the search would have results.