Post

2 followers Follow
0
Avatar

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

Shravan Panyam

Please sign in to leave a comment.

4 comments

0
Avatar

I don't understand your question. External ID is never set to null and you can't edit it, it is provided by the API. Are you using the term "External ID" to mean something else than it does in the App settings -> Developer view?

 

 

Henrik Huhtinen 0 votes
0
Avatar

So podio has two different things that it calls "external_id":

  1. The auto generated external ID for a FIELD that you see in the developer tab
  2. 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.

Shravan Panyam 0 votes
0
Avatar

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.

 

 

Henrik Huhtinen 0 votes