Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
I cannot get the search query api to work - it gives partial matches
I've tried using postman and single and double quotes do not make any difference either
I can filter the results but it seems like i must be doing something wrong
https://api.smartsheet.com/2.0/search/sheets/798272320235396?query="'Elliott'"
returns
{
"results": [
{
"text": "White cottage",
"objectType": "row",
"objectId": 3223433130600324,
"parentObjectType": "sheet",
"parentObjectId": 798272320235396,
"parentObjectName": "Leads",
"contextData": [
"Row 24: 2003"
]
}, etc etc etc
Comments
-
Please use double quotes - not both (as in your example)
For example
search/sheets/7515998992525188?query="Building"
This only matches rows with the complete word "Building" - but not rows with "Build"
-
Hey Phips,
Welcome to the Smartsheet Community. I worked with you over email. The issue was caused by a space between the equals symbol and the first set of quotations.
https://api.smartsheet.com/2.0/search/sheets/{sheet ID}?query= "'Elliott'"
Both in the API and in the app, if you search for a word without quotes it will search for any combination of the letters which is why it found ott in cottage. Placing quotes around the word Elliott would force the search to only find that exact combination. I can't explain why the extra space caused the issue but it was causing the API to not search by the exact phrase.
Steve is correct that you don't need the single and double quotes around your search string.
Let me know if this doesn't resolve the issue for you.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives