# How to obtain the selected custom field value from a project in a protfolio?

**URL:** <https://forum.asana.com/t/how-to-obtain-the-selected-custom-field-value-from-a-project-in-a-protfolio/512771>\
**Category:** API & Developers\
**Created:** [19 August 2023 18:13 UTC](https://forum.asana.com/t/how-to-obtain-the-selected-custom-field-value-from-a-project-in-a-protfolio/512771 "2023-08-19T18:13:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David171](https://luna1.co/8d76cd.png) [@David171](https://forum.asana.com/u/David171)\
**Post date:** [19 August 2023 18:13 UTC](https://forum.asana.com/t/how-to-obtain-the-selected-custom-field-value-from-a-project-in-a-protfolio/512771/1 "2023-08-19T18:13:39Z")

</div>

I’ve been trying to get to the actual selected values of my custom fields but seems like I can only get the existing fields but not their values?

i.e. Using Python:

# create an instance of the API class

api\_instance = asana.CustomFieldSettingsApi(asana.ApiClient(configuration))

project\_gid = ‘MYPROJECT\_GID’  
opt\_fields = [“custom\_field.name.display\_value”]

try:  
# Get a project’s custom fields  
api\_response = api\_instance.get\_custom\_field\_settings\_for\_project(project\_gid, opt\_fields=opt\_fields)  
pprint(api\_response)  
except ApiException as e:  
print(“Exception when calling CustomFieldSettingsApi-\>get\_custom\_field\_settings\_for\_project: %s\n” % e)

I get this:

```auto
{'data': [{'custom_field': {'asana_created_field': None,
                            'created_by': None,
                            'currency_code': None,
                            'custom_label': None,
                            'custom_label_position': None,
                            'date_value': None,
                            'description': None,
                            'display_value': None,
                            'enabled': None,
                            'enum_options': None,
                            'enum_value': None,
                            'format': None,
                            'gid': '1205091168333886',
                            'has_notifications_enabled': None,
                            'is_formula_field': None,
                            'is_global_to_workspace': None,
                            'is_value_read_only': None,
                            'multi_enum_values': None,
                            'name': 'Priority',
                            'number_value': None,
                            'people_value': None,
                            'precision': None,
                            'resource_subtype': None,
                            'resource_type': None,
                            'text_value': None,
                            'type': None},
           'gid': '1205091168333892',
           'is_important': None,
           'parent': None,
           'project': None,
           'resource_type': None},
          {'custom_field': {'asana_created_field': None,
                            'created_by': None,
                            'currency_code': None,
                            'custom_label': None,
                            'custom_label_position': None,
                            'date_value': None,
                            'description': None,
                            'display_value': None,
                            'enabled': None,
                            'enum_options': None,
                            'enum_value': None,
                            'format': None,
                            'gid': '1205091168333899',
                            'has_notifications_enabled': None,
                            'is_formula_field': None,
                            'is_global_to_workspace': None,
                            'is_value_read_only': None,
                            'multi_enum_values': None,
                            'name': 'Status',
                            'number_value': None,
                            'people_value': None,
                            'precision': None,
                            'resource_subtype': None,
                            'resource_type': None,
                            'text_value': None,
                            'type': None},
           'gid': '1205091168333906',
           'is_important': None,
           'parent': None,
           'project': None,
           'resource_type': None},
          {'custom_field': {'asana_created_field': None,
                            'created_by': None,
                            'currency_code': None,
                            'custom_label': None,
                            'custom_label_position': None,
                            'date_value': None,
                            'description': None,
                            'display_value': None,
                            'enabled': None,
                            'enum_options': None,
                            'enum_value': None,
                            'format': None,
                            'gid': '1205091168333914',
                            'has_notifications_enabled': None,
                            'is_formula_field': None,
                            'is_global_to_workspace': None,
                            'is_value_read_only': None,
                            'multi_enum_values': None,
                            'name': 'Effort level',
                            'number_value': None,
                            'people_value': None,
                            'precision': None,
                            'resource_subtype': None,
                            'resource_type': None,
                            'text_value': None,
                            'type': None},
           'gid': '1205091168333920',
           'is_important': None,
           'parent': None,
           'project': None,
           'resource_type': None}],
 'next_page': None}

```

Ideally I’d like to get the values selected for:

- ‘name’: ‘Priority’
- ‘name’: ‘Status’
- ‘name’: ‘Effort level’

Any ideas?  
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 August 2023 20:07 UTC](https://forum.asana.com/t/how-to-obtain-the-selected-custom-field-value-from-a-project-in-a-protfolio/512771/2 "2023-08-19T20:07:43Z")

</div>

In Asana, “custom field settings” refers to the definition of what custom fields are configured to belong to a project or portfolio; it’s only related to the configuration, not to any actual data of objects in that portfolio or project.

To get the actual values of custom fields in a project, you’ll want to use this endpoint:

> **[Get a project](https://developers.asana.com/reference/getproject)**
>
> Returns the complete project record for a single project.

---

<div class="post-metadata">

**Author:** ![John\_Vu](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/john_vu/32/97235_2.png) [@John\_Vu](https://forum.asana.com/u/John_Vu)\
**Post date:** [21 August 2023 21:07 UTC](https://forum.asana.com/t/how-to-obtain-the-selected-custom-field-value-from-a-project-in-a-protfolio/512771/3 "2023-08-21T21:07:20Z")

</div>

Hi @David171,

@Phil_Seeman is right. If you want to get the actual values of the custom fields in your project you’ll want to call our [Get a project](https://developers.asana.com/reference/getproject) endpoint.

Here’s how you would do that with our python client library (v4.X.X):

```plaintext
import asana
from asana.rest import ApiException
from pprint import pprint

# Configure access token
configuration = asana.Configuration()
configuration.access_token = '<YOUR_PERSONAL_ACCESS_TOKEN>'
api_client = asana.ApiClient(configuration)

# Create a project API Instance
project_api_instance = asana.ProjectsApi(api_client)

# Query params
project_gid = "<YOUR_PROJECT_GID>"
opt_fields = ["custom_fields"]

try:
    # Get a project
    api_response = project_api_instance.get_project(project_gid, opt_fields=opt_fields)
    pprint(api_response.data.custom_fields)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_project: %s\n" % e)

```

Here’s what the result would look like from running the above code. NOTE: this result is from having a single select custom field on the project so yours will probably look different:

```plaintext
[{'date_value': None,
 'display_value': 'CF Option 1',
 'enabled': True,
 'enum_options': [{'color': 'green',
                   'enabled': True,
                   'gid': '<ENUM_OPTION_1_GID>',
                   'name': 'CF Option 1',
                   'resource_type': 'enum_option'},
                  {'color': 'red',
                   'enabled': True,
                   'gid': '<ENUM_OPTION_2_GID>',
                   'name': 'CF Option 2',
                   'resource_type': 'enum_option'}],
 'enum_value': {'color': 'green',
                'enabled': True,
                'gid': '<ENUM_OPTION_1_GID>',
                'name': 'CF Option 1',
                'resource_type': 'enum_option'},
 'gid': '<CUSTOM_FIELD_GID>',
 'is_formula_field': False,
 'multi_enum_values': None,
 'name': 'This is a custom field',
 'number_value': None,
 'resource_subtype': 'enum',
 'resource_type': 'custom_field',
 'text_value': None,
 'type': 'enum'}]

```

In this example the selected value for the single select custom field for this project is:

```plaintext
 'enum_value': {'color': 'green',
                'enabled': True,
                'gid': '<ENUM_OPTION_1_GID>',
                'name': 'CF Option 1',
                'resource_type': 'enum_option'},

```

 ![project_cf](https://us1.discourse-cdn.com/asana/original/3X/a/e/aee7f53db25b892853af4923296a24a8f62ac8ed.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:01 UTC](https://forum.asana.com/t/how-to-obtain-the-selected-custom-field-value-from-a-project-in-a-protfolio/512771/4 "2025-05-30T19:01:45Z")

</div>

Closed on 30 May 2025 19:01 UTC


