# Accessing Custom Field Values in a Portfolio

**URL:** <https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246>\
**Category:** API & Developers\
**Created:** [30 June 2021 20:58 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246 "2021-06-30T20:58:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon29930175](https://luna1.co/8d76cd.png) [@anon29930175](https://forum.asana.com/u/anon29930175)\
**Post date:** [30 June 2021 20:58 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/1 "2021-06-30T20:58:44Z")

</div>

I am trying to access the values of custom fields in a portfolio. The program works for finding the custom field values from a project, but not for a portfolio. How can I fix this?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [1 July 2021 01:57 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/2 "2021-07-01T01:57:45Z")

</div>

Hi @anon29930175,

You didn’t say what you’ve tried thus far, but “portfolio custom fields” aren’t stored on the portfolio, they’re stored in a project. If you get a project’s data from [this endpoint](https://developers.asana.com/docs/get-a-project), it will include the custom fields and their values.

---

<div class="post-metadata">

**Author:** ![anon29930175](https://luna1.co/8d76cd.png) [@anon29930175](https://forum.asana.com/u/anon29930175)\
**Post date:** [1 July 2021 18:35 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/3 "2021-07-01T18:35:55Z")

</div>

Hi @Phil_Seeman,

Sorry I should’ve given more background. I’m writing a program in Visual Basic for Excel. The program is supposed to pull custom field values associated with the projects in a portfolio. I was able to figure out how to get the custom field data from projects and how to do this in a portfolio. However, in this portfolio, there are both portfolios and projects stored inside of it. So, how would I be able to get the custom field data from the portfolio stored inside of another portfolio?

---

<div class="post-metadata">

**Author:** ![Logan\_Nissenson](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/logan_nissenson/32/80777_2.png) [@Logan\_Nissenson](https://forum.asana.com/u/Logan_Nissenson)\
**Post date:** [6 July 2021 14:28 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/4 "2021-07-06T14:28:04Z")

</div>

Any feedback from the Asana API team would be much appreciated! If portfolios within portfolios is a new feature, maybe they don’t have an endpoint yet for portfolio custom fields?

---

<div class="post-metadata">

**Author:** ![Logan\_Nissenson](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/logan_nissenson/32/80777_2.png) [@Logan\_Nissenson](https://forum.asana.com/u/Logan_Nissenson)\
**Post date:** [6 July 2021 14:48 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/5 "2021-07-06T14:48:26Z")

</div>

It also appears that the native Asana export tools (CSV export and google sheet export) don’t include the portfolios stored within another portfolio

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [8 July 2021 01:03 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/6 "2021-07-08T01:03:47Z")

</div>

Hi @anon29930175 and @Logan_Nissenson,

Maybe I’m missing something here, but again, as far as I understand it custom fields aren’t stored in a portfolio, they’re stored in the project that appear in that portfolio. Whether the portfolio is contained within another one or not shouldn’t matter, as you’re using the `projects` endpoint on a project within the portfolio to get the custom fields and values.

---

<div class="post-metadata">

**Author:** ![anon29930175](https://luna1.co/8d76cd.png) [@anon29930175](https://forum.asana.com/u/anon29930175)\
**Post date:** [12 July 2021 16:05 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/7 "2021-07-12T16:05:14Z")

</div>

Hi @Phil_Seeman,

Thanks for the responses I appreciate the help. I’ve attached an example so we can all get on the same page. As you can see, there is a portfolio within a portfolio that has custom field values associated with it. When I use the /portfolios/{portfolio number} endpoint, the response contains the custom field settings, but not the custom field values. This is difficult because the portfolio does have custom field values, but I’m not sure how to access these values.

 ![Example](https://us1.discourse-cdn.com/asana/original/3X/e/1/e1d271f45df2438770196e8733f0fb5e48b8238f.png)

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [12 July 2021 21:13 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/8 "2021-07-12T21:13:35Z")

</div>

@anon29930175,

Ah, I see your point - for some reason, while `projects` return their `custom_fields` property by default, `portfolios` do not.

To get the custom fields and values for your portfolio, include `opt_fields=custom_fields` in your request. That should do the trick.

@Ross_Grambo @Andrew-asana, any idea why this inconsistency in the API? It seems to me that `GET /projects/:project_gid` and `GET /portfolios/:portfolio_gid` should behave consisntly with each other in terms of returning the custom fields collection, no?

---

<div class="post-metadata">

**Author:** ![Thomas\_Goric\_Urup](https://luna1.co/8d76cd.png) [@Thomas\_Goric\_Urup](https://forum.asana.com/u/Thomas_Goric_Urup)\
**Post date:** [19 November 2024 13:43 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/9 "2024-11-19T13:43:57Z")

</div>

Hi,

Sorry for my late question on this thread. It seems, that the opt\_fields for retrieving the custom fields in a portfolio is archived? When using this API: [Get portfolio items](https://developers.asana.com/reference/getitemsforportfolio). My issue is the same as Anon described years ago, however I am working inside Zapier to connect two systems, what I would need is the ouput in the custom fields for a specific project inside the portfolio.

Any help or suggestion to do so would be great.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [19 November 2024 15:50 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/10 "2024-11-19T15:50:36Z")

</div>

> [@Thomas\_Goric\_Urup](#):
>
> It seems, that the opt\_fields for retrieving the custom fields in a portfolio is archived?

What do you mean by “is archived”?

---

<div class="post-metadata">

**Author:** ![Thomas\_Goric\_Urup](https://luna1.co/8d76cd.png) [@Thomas\_Goric\_Urup](https://forum.asana.com/u/Thomas_Goric_Urup)\
**Post date:** [22 November 2024 07:13 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/11 "2024-11-22T07:13:36Z")

</div>

Hi Phil,  
It seems, whatever opt\_fields I include in the GET call, nothing seems to change, and it does not include the custom fields showcased inside the portfolio.

I use this one: [https://app.asana.com/api/1.0/portfolios/XX/items?opt\_fields=custom\_field\_settings.custom\_field](https://app.asana.com/api/1.0/portfolios/XX/items?opt_fields=custom_field_settings.custom_field)  
It only outputs:

- GID of Project
- Name of Project
- Resource type

I might be missing other things, as I am not the most IT-friendly, however I need to learn it :).

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [25 November 2024 05:30 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/12 "2024-11-25T05:30:34Z")

</div>

@Thomas_Goric_Urup,

Try the syntax shown above: `opt_fields=custom_fields`

`custom_field_settings` does not contain the actual values of the custom fields; that contains the definition of which custom fields are in the project or portfolio, which won’t be of any value to you here.

---

<div class="post-metadata">

**Author:** ![Thomas\_Goric\_Urup](https://luna1.co/8d76cd.png) [@Thomas\_Goric\_Urup](https://forum.asana.com/u/Thomas_Goric_Urup)\
**Post date:** [29 November 2024 07:24 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/13 "2024-11-29T07:24:42Z")

</div>

> [@Phil\_Seeman](#):
>
> opt\_fields=custom\_fields

Hi Phil, Thank you for the reply.

I see it works when trying it on the Asana guide page, however only GID of Project, Name of Project and Resource Type is included whenever I try do the API call inside Zapier.

 ![image](https://us1.discourse-cdn.com/asana/original/4X/3/c/b/3cb97c23314764c10f168987da0169516c13c886.png)  
 ![image](https://us1.discourse-cdn.com/asana/original/4X/f/1/d/f1d4fe9788b7221ebcdad1c30950338cf2c4bc9f.png)

Any idea or solution would be great, thank you in advance.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [29 November 2024 18:20 UTC](https://forum.asana.com/t/accessing-custom-field-values-in-a-portfolio/127246/14 "2024-11-29T18:20:26Z")

</div>

If it works properly in the Asana API page but not in Zapier, then it must be something specific to Zapier which you’d have to address with them, I’m afraid.
