Filtering items by field VALUE not ID

Comments

5 comments

  • Andreas Garnæs

    Hi Veranika,

    What type of field is 101488477? You can see the field types here: https://developers.podio.com/doc/applications (list is not a type)

    Thanks,
    Andreas

    0
    Comment actions Permalink
  • Veranika Mauchanskaya

    Hi Andreas!
    It's category field with values like "steve", "john", "bob" etc.

    0
    Comment actions Permalink
  • Andreas Garnæs

    What you describe should work then. Could you please try enable debugging and share the output? http://podio.github.io/podio-php/debug/

    Thanks!

    0
    Comment actions Permalink
  • Headnet

    Hi!
    I have the same issue. Only id's work when I filter on category.
    I guess Podio only supports id for filtering on category. This is really sad. See "category" here: https://developers.podio.com/doc/items (no sub_ids!)

    Workaround that I use:

    // Hack to get the right option_id based on text value
    $cat_option_value = 'Some category value that I need to find the Id of';
    $cat_list = PodioAppField::get( $this::$sites_app_id, 'category-external-id' );
    $all_options = $cat_list->config['settings']['options'];
    foreach ($all_options as $option) {
    if ($option['text'] === $cat_option_value){
    $cat_option_id = $option['id'];
    }
    }

    1
    Comment actions Permalink
  • Andreas Garnæs

    I've tried to replicate your issue, but it works for me. It may be a bug in the PHP client. If you can enable debugging and share the output, it would be great for investigating further.

    Thanks,
    Andreas

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk