Reputation: 21
I want to apply multiple modifiers on the same field. Basically, I need to send something like this
/bill/count?field=TEXT&field_Mod=ne&field_Mod=notnull
However, in this way only first modifier will be recognized and second ignored. Is there anyway to send multiple modifiers on the same field? I couldn't find an answer related to this question.
Any help would be appreciated.
Upvotes: 1
Views: 188
Reputation: 241
You would do this by prefixing an OR:1: to the first of each 2 line block or AND:1:
You would use the AND:1: if you are looking for 2 things in the same field. Otherwise everything are ands by default.
In your case it would be:
For the text mode filter for a report it would be:
OR:1:field=TEXT
OR:1:field_Mod=ne
OR:2:field=0
OR:2:field_Mod=notnull
Which would parse to the API request to:
OR:1:field=TEXT&OR:1:field_Mod=ne&OR:2:field=0&OR:2:field_Mod=notnull
It should be noted that the filter syntax for a report and API are the same, but for & between the lines rather than newlines. This means you can create a report in the UI, test the results, then convert to text and use that in the API to get the same results. For the most part ;)
Upvotes: 2