2

I have an app that has several fields in it and some of them have a category item that only has one value (Yes) we use that field to keep track of whether or not a client is using that feature in our software or not. We have it so that when the feature is turned on the value in selected in podio and the 'Yes' value is then highligted (or selected). However, I am having difficulty setting the field to no value when they are no longer wanting to use that feature. I have tried values '', false, No value, No, null. All of these return an error from podio telling me that they are not valid values. All I want to do is unselect a category option using the API.

PodioItem::update((int) $user->getPodioProject(), array('fields' => array(
                    "field-name" => '')));

this is what I get in response from podio

[error_description] => Invalid value "" (string): Not a valid option
        [error] => invalid_value

Thanks Jamie

2 Answers2

1

Category field value is array and not empty string, please try:

PodioItem::update((int) $user->getPodioProject(), array('fields' => array(
                   "field-name" => array())));
Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19
0

Open an item in that app, right click on the 'No' option then click 'Inspect Element'. You will find the HTML tag of that option, look at the value inside of data-id="", this is the value you are looking for. :)