web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using choice fields in...
Power Apps
Answered

Using choice fields in a formula column (Dataverse for Teams)

(0) ShareShare
ReportReport
Posted on by 292

What is the syntax for referencing a Choice field within a formula? 

I'm trying to reference a choice field value -- MeasureProgressFrequency as part of the formula in a separate column in the same table.   

MelissaReed_0-1666751875556.png

 

If I reference a text field column (like FirstName) in this formula, even concatenate several together it works fine. 

The holdup is the Choice field.

But I can't figure out the syntax this needed to reference the record's MeasureProgressFrequency selected value within a formula column in the same table (illustrated above)    

  • Tacking on ".Value" doesn't help.
  • Tacking on ".Selected" doesn't help
  • I  tried  'MeasureProgressFrequency (OKRS)'), and tacking.Value onto that.

I could write the formula on the Power Apps side, but I want it stored at the table level so it's available to Power BI.

Anyone else run into (and hopefully solved) this?!

 

 

I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @MelissaReed ,

     

    Unfortunately, this preview column doesn't support this data type now.

    vxiaochenmsft_0-1666762451628.png

    https://learn.microsoft.com/en-us/power-apps/maker/data-platform/formula-columns#data-types

     

    Hope it saves your time.

     

    Best Regards,

    Wearsky

  • MelissaReed Profile Picture
    292 on at

    Thanks @v-xiaochen-msft 

    I did see that page but meant the value type, not the table column type.  My pick list is a list of Text values.

    But Choice fields are not supported at all.  That probably also explains why I'm having trouble referencing that Selected.Value in a formula on the App side as well.    I can display it, just not combine it with anything else.  Or even store it to a variable.  Maddening!      I guess I'll have to go to Plan B -- calculate it in a flow and store it back to the record.    Thanks for your help!

  • Owen Wetherow Profile Picture
    71 on at

    I know that this may not be totally satisfying but you can you use JavaScript to access the value of a choice field

    In this case I wanted to calculate 'Residual exposure' = 'Residual likelihood' x 'Residual impact'

     

    function CalculateResidualExposure(executionContext) {


    var formContext = executionContext.getFormContext();
    var rlike = formContext.getAttribute("papm_residuallikelihood").getValue();
    var rimpact = formContext.getAttribute("papm_residualimpact").getValue();

     

    formContext.getAttribute("papm_residualexposurevalue").setValue(rlike*rimpact)

     

    }

     

    • I had to create an event on both 'Residual likelihood' and 'Residual impact'. This set the value of 'Residual exposure value'
    • Make sure to pass Execution Context

     

    Owen_Wetherow_0-1719352919007.png

     

     I really wish I was able to use the field values in the fx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard