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:
{'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!