Viroun Posted March 19, 2023 Report Share Posted March 19, 2023 Hi there, For a custom search form, i need to make a caspio API fetch with a criterion query like : q.where=Full_Name CONTAINS 'foo' or something with a wildcard like : q.where=Full_Name='*foo*' or q.where=Full_Name='*%foo%' I've tried them all but this doesn't seem to work Any help would be appreciated ! Thanks Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted March 20, 2023 Report Share Posted March 20, 2023 Hello @Viroun, Please use LIKE operator https://www.w3schools.com/sql/sql_like.asp It works with wildcards in case you need to search for some pattern. For example: Full_Name LIKE '%Doe%' This is the request URL example for the method used in the screenshot above: As for the CONTAINS predicate, it is used for a different purpose. CONTAINS SQL checks to see if one string is a substring of another string. For Microsoft SQL Server and similar systems, CONTAINS lets you do full-text term pattern-matching queries on your tables. And it is not supported on Caspio Tables, since the Table must be full-text indexed to use it. I hope that you just need to search for a specific pattern, so the LIKE operator should help. Quote Link to comment Share on other sites More sharing options...
Question
Viroun
Hi there,
For a custom search form, i need to make a caspio API fetch with a criterion query like :
q.where=Full_Name CONTAINS 'foo'
or something with a wildcard like :
q.where=Full_Name='*foo*' or
q.where=Full_Name='*%foo%'
I've tried them all but this doesn't seem to work
Any help would be appreciated !
Thanks
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.