1

I'm currently trying to use Attask API's to pull out a list of users based on a string parameter, using the name_Mod "contains".

So far so good, I can pull back a list of usernames and their corresponding ID's but I've found that the api appears to be case sensitive.

For example, I give it the parameter "Dan"...

"https://wibble.attask-ondemand.com/attask/api/user/search?sessionID=wibble&$$LIMIT=2000&name=Dan&name_Mod=contains&fields=ID,name"

...and I get results like "Daniel Brown"

I give it "dan"...

"https://wibble.attask-ondemand.com/attask/api/user/search?sessionID=wibble&$$LIMIT=2000&name=dan&name_Mod=contains&fields=ID,name"

...I get results like "Rachael Jordan", but no "Daniel Brown".

Is there a way to tell Attask that I don't care about case sensitivity? To just give me both results and let me worry about it? Or a way around this particular limitation if it exists?

4

3 回答 3

2

还有其他MOD名为cicontainswhere 的ci意思case insensitive。您可以改用它。

于 2014-08-20T20:26:43.510 回答
0

我在 Jim 使用的方法中遇到了一些限制。

具体来说,这个查询不会像您期望的那样工作。

..attask/api/project/search?status=CPL&status=CON&status_Mod=contains&$$LIMIT=2000

只返回第一个状态。

我使用“包含”过滤器进行搜索的首选解决方案是:

../attask/api/user/search?filters={firstName:['Chris','Steve','steve','Stephen','Anne']}

我觉得以编程方式组装数组更容易,因为您不必预先添加字段名称。

如果需要,您可以对字符串中的第一个字符执行 ToUpper、ToLower 和 Case 并覆盖大部分

过滤器动词不响应字段修饰符。您不能使用不等于、小于等。

希望有帮助!

于 2014-08-18T23:31:59.690 回答
-1

您是正确的搜索字段区分大小写。获得 dan 和 Dan 这两个结果的唯一方法是将两者都包含在其余请求中。一个例子是

" https://wibble.attask-ondemand.com/attask/api/user/search?sessionID=wibble& $$LIMIT=2000&name=dan&name=Dan&name_Mod=contains&fields=ID,name"

让我知道这是否适合你。

于 2014-08-15T19:15:14.213 回答