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

Notifications

Announcements

Community site session details

Community site session details

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

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
    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
    69 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard