# Query String from Xojo

**URL:** <https://the.fmsoup.org/t/query-string-from-xojo/5025>\
**Category:** Floating Topics\
**Created:** [September 4, 2025, 11:44am UTC](https://the.fmsoup.org/t/query-string-from-xojo/5025 "2025-09-04T11:44:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrawfCol](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@CrawfCol](https://the.fmsoup.org/u/CrawfCol)\
**Post date:** [September 4, 2025, 11:44am UTC](https://the.fmsoup.org/t/query-string-from-xojo/5025/1 "2025-09-04T11:44:31Z")

</div>

I am using the following after connecting to my FM database:

Dim query As String = "{""query"": {""c\_Haulier"": ""=Test Company""} }"  
Dim findResponse As FMResponseMBS = connection.FindRecords(query)  
If findResponse = Nil Or findResponse.ErrorCode \<\> 0 Then  
MsgBox "Find failed: " + findResponse.ErrorMessage  
Return  
End If

I get the error “Find failed: ‘query’: Expected type array but found type object.

How can I change the string to correct the error?

---

<div class="post-metadata">

**Author:** ![CrawfCol](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@CrawfCol](https://the.fmsoup.org/u/CrawfCol)\
**Post date:** [September 4, 2025, 11:57am UTC](https://the.fmsoup.org/t/query-string-from-xojo/5025/2 "2025-09-04T11:57:52Z")

</div>

Also tried:

Dim query As String = "{""query"":[{""c\_Haulier"": ""=Test Company""}],""sort"":[{""fieldName"": ""c\_Haulier"",""sortOrder"": ""ascend""}}] }"

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [September 4, 2025, 12:04pm UTC](https://the.fmsoup.org/t/query-string-from-xojo/5025/3 "2025-09-04T12:04:56Z")

</div>

Have you checked Claris' documentation?

> **[Perform a find request](https://help.claris.com/en/data-api-guide/content/perform-find-request.html)**

So in the first thing you didn't pass an array for query with , but an object with {}.

What does happen for the second query?

PS: The second query has an extra } after ascend on the end.
