Summary
You can now programmatically leverage the capabilities of Asana’s formula custom fields with the API. These fields enable you to perform calculations and manage data within Asana.
Usage
Custom fields schemas now includes an is_formula_field
property, a boolean value that describes whether a field is a formula custom field.
Here’s an example of the custom field object returned for the formula custom field from the above screenshot:
{
"gid": "12345",
"enabled": true,
"name": "Time to completion",
"description": "",
"number_value": 225023,
"precision": 0,
"created_by": {
"gid": "54321",
"name": "Andrew",
"resource_type": "user"
},
"display_value": "22w 2d",
"resource_subtype": "number",
"resource_type": "custom_field",
"is_formula_field": true,
"is_value_read_only": true,
"type": "number"
}
For additional guidance on using custom fields in the API, see the custom fields guide.
Special considerations
Please take note that in the current state, formula custom fields are presented and managed as number
custom fields in the API. It’s important to also be aware that, as of now, you cannot create or update values for formula custom fields through the API.
Questions & feedback
Formula custom fields empowers users to conduct an extensive array of calculations within Asana. We’re excited to hear your feedback and field any questions as you add this new feature to your apps.
Happy coding!
Best,
Andrew