on 04-28-2017 9:58 AM
Hello,
I am having issues in order to do a "complex" filter request using the iOS SDK DataQuery class. What I would like to achieve is to search if one attribute contains an string (basically a substring() operator).
Using an string query it should be as simple as this:
$filter=substring('text', ObjectName) eq true
DataQuery().filter("substring('\(text)',ObjectName eq true”)
(obviously this is not valid because filter method is not accepting an string predicate parameter)
Hello Eloi,
I do not get your OData example, execpt you mean the "substringof" function instead of the "substring" function (for the "substring" function your arguments to not match).
If that is the case, the substringof function is equivalent to a QueryFunction.contains operation.
Something like the following dummy coding (consider that of course the EntityValueClass.propertyName has to be replaced by the property name on which you wanna do the contains aka substringof operation):
let queryFunc = QueryFunction.contains(EntityValueClass.propertyName, searchValue: "test")
let queryFilt = QueryFilter.from(qfunc)
let query = DataQuery.select(...)
let query = query.filter(queryFilt)
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.