Is there a way to set the external_id of all items in an app to be equal to the value of one of its fields?
Currently, we're tracking external ID as a text field in the item, and the actual external_id is set to null. But because it's a text field, we're not able to filter on that field using the API, nor are we able to filter on a calculation field that just returns int(@other_field).
So is there a quick way to set the external_id of every item to match the existing field, or will we have to loop through each one and set the external_id one by one via API?
Thanks
-
So podio has two different things that it calls "external_id":
- The auto generated external ID for a FIELD that you see in the developer tab
- A hidden external ID for an ITEM that the user is responsible for setting.
The second one is able to be used by the API to filter items by that id. In our case, we sure podio-py, so the method is podio.Item.filter_all_by_external_id(app_id, external_id).
Our app currently stores external id in a text field on the app, but we are unable to filter items based on that field. We can, however successfully filter using the filter_all_by_external_id method.
I suppose our solution here would be to reimport all items from excel and set the external id that way.
-
An item has and itemid that is globally unique, and then it has a unique id, that is unique within the app. I'm not aware that either of these could be edited by the user. If there is another id addition to these, then there is some id I am not aware of.
Sorry, I guess I can't be of help, I'm unfollowing this conversation.
-
Np, thanks for the input. I'm referring to this function in the API: https://developers.podio.com/doc/items/get-item-by-external-id-19556702. You can see "external_id" returned for each item when you run get_items: https://developers.podio.com/doc/items/get-item-22360
I'm not able to set that external_id from the interface in any way. Is the API the one thing with access to that?
Please sign in to leave a comment.
Comments
4 comments