2

I couldn't find the answer to either question below in the Podio API documentation (perhaps I just overlooked it at https://developers.podio.com/doc), and from looking through the old Podio developer's forum (https://help.podio.com/hc/en-us/community/topics/200069178-Podio-API-Developer-Forum) it seems that the answer to 1 below is "That's not possible", but before I resort to resolving both questions in my code, I'd like some clarification on both issues.

  1. The following JSON category query filter does "if org-type = 3 _**or**_ org-type = 4":

    {"filters":{"org-type":[3,4]}}

    But is it possible do "if org-type = 3 _**and**_ org-type = 4"?

  2. And the following does "if org-type = 3 and loc = 7":

    {"filters":{"org-type":[3],"loc":[7]}}

    But is it possible to do "if org-type = 3 _**or**_ loc = 7"?

Mukesh Ram
  • 6,248
  • 4
  • 19
  • 37
dmerrell
  • 21
  • 2
  • The first one is not useful: `"if org-type = 3 _and_ org-type = 4"` is always false. – trincot Jul 19 '16 at 05:14
  • You are right, I was oversimplifying problem 1. Categories can have multiple values and what I was looking for was a solution to: I want to find all orgs that are both governmental and educational, but exclude ones that are only governmental or only educational. But I realize now that that requires a more complex query, along the lines of "if org-type in (3,4) group by org-id having count(*) = 2". Thanks for the response. – dmerrell Jul 20 '16 at 13:37

1 Answers1

3

What you seem to be asking is is for an or filter when you filter two different fields within the same app. Unfortunately this is not possible directly through the API in the way you're looking for. Some other alternatives I've come up with include just filtering twice and merging arrays of filtered items, as well as using a seperate calculation field within Podio that gives a certain value when either of the filter values you want are true, and running the filter call on that instead.

Nathanael
  • 954
  • 3
  • 19
  • 39