Filter on empty field
I would like to filter items with an empty value on a specific field, but I receive an error. How do I filter these items? I tried: $app = PodioItem::filter($app_id, array('filters' => array($FieldThatMustBeEmpty => ''))); Array400/item/app/2779441/filter/Invalid value u'' (string): Must not be empty $app = PodioItem::filter($app_id, array('filters' => array($FieldThatMustBeEmpty => NULL))); Array400/item/app/2779441/filter/Invalid value None (null): must be non empty string

  • Old thread I see, but I recently was looking to do this and found a solution that worked for myself. I needed to filter based on empty an Number Field. One which recorded the estimate # and invoice # in QuickBooks. So I created a Calculation Field, which just checks for null through a series of if statements. 0 - Both fields are empty 1 - Estimate is filled, Invoice is empty 2 - Estimate is filled, Invoice is filled There's probably a dozen ways to write this and I'm not the best at these logical calculations, but this is how I did it and was able to accomplish what I wanted. Then to create the views I wanted in my Projects App, I filtered by this new field, based on number ranges. The following is for items that do not have an estimate entered (if they are in the estimating category): And the following is for items that do not have an invoice entered (if they are in the invoicing category): Hope this helps all future searchers looking to accomplish something like this.
  • It would be SO useful to filter on a null date field! And surely not difficult to code? Any chance please? Thanks, Matt
  • Hi Nunzio, As I mentioned in the first comment in this thread only category, app, contact and question fields will filter on null. We don't support filtering for null values on date fields at the moment. All the best, Andreas
  • Hi Guys Just following up on this thread... i'm trying to build a filter that shows me all items that have a null (or blank) value in a date field? I can't for the life of me work out how i should do this? Any ideas would be greatly appreciated! thnx so much   ciao    nunz
  • Filtering on text fields is not possible for performance reasons. As I mentioned above you can use the search interface to search a specific app. This will among other things search text fields. Read more about it here https://developers.podio.com/doc/search -- it's a pretty powerful tool. /Andreas
  • Pulling all items is not a great option: there are 15.000+ items. Why is filtering on text fields not possible? When I try, the API already returns the total amount of filtered items.
  • You cannot filter on text fields. You can see the list of fields you can use for filtering on the link in my previous comment. You can use the search interface for text fields, but it will also not allow you to search for the null value. If the app does not contain an excessive amount of items you can simply pull all the items in the app and do the filtering yourself. All the best, Andreas 
This question is closed.