How to Take Option Set Label in Power Automate
How to Take Option Set Label in Power Automate
When working with Dataverse Choice (Option Set) fields in Power Automate, the flow often returns the numeric value instead of the user-friendly label. In many business scenarios, users need the label value for emails, reports, approvals, and notifications.
Power Automate provides access to formatted values that allow you to retrieve the display label associated with a Choice field.
Why Retrieve the Option Set Label?
- Display user-friendly values in emails
- Generate readable reports
- Improve approval notifications
- Avoid numeric option values
- Enhance user experience
Option Set Value Example
Dataverse stores Option Set values internally as numbers.
Status = 100000001
Displayed Label:
ActiveRetrieve Formatted Value
Use the formatted value property returned by Dataverse actions.
outputs('Get_a_row_by_ID')?['body/statuscode@OData.Community.Display.V1.FormattedValue']
This returns the label instead of the numeric value.
Using Dynamic Content
Many Dataverse actions automatically expose the formatted label through Dynamic Content.
Status (Label) Priority (Label) Category (Label)
Simply select the label version instead of the numeric field.
Using Labels in Email Notifications
Option Set labels are commonly used when sending emails.
Status: Active Priority: High Category: Customer Request
This makes notifications easier for business users to understand.
Important: Formatted values are available only when the Dataverse connector returns OData formatted values. Most standard Dataverse actions include them automatically.Common Use Cases
- Email notifications
- Approval workflows
- PDF generation
- Excel exports
- Audit reporting
- Business dashboards
Best Practices
- Use labels for user-facing outputs.
- Use numeric values for business logic comparisons.
- Verify formatted values exist before usage.
- Keep Choice labels business-friendly.
- Test across different environments.
Key Takeaways
- Dataverse stores Choice values as numbers.
- Formatted values return the display labels.
- Labels are ideal for emails and reports.
- Dynamic Content often provides label fields automatically.
- Using labels improves readability and user experience.