Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

How to lookup a choice column value

(0) ShareShare
ReportReport
Posted on by 364

Hi All, 

 

I have an app that manages goals set by employees and allows their manager to conduct a review for those goals. One column that gets looked at when a review happens is a choice column from Dataverse, called 'Achieved?'

 

Each employee has a maximum of 7 goals, and I am using the following code to bring the proper goal into the app: 

If(goalFirst= true,
LookUp('Goal Managements',Goal=_goal1).Goal,
If(goalSecond= true,
LookUp('Goal Managements',Goal=_goal2).Goal,
If(goalThird= true,
LookUp('Goal Managements',Goal=_goal3).Goal,
If(goalFourth= true,
LookUp('Goal Managements',Goal=_goal4).Goal,
If(goalFifth= true,
LookUp('Goal Managements',Goal=_goal5).Goal,
If(goalGG1 = true,
LookUp('Group Goals', ID = _GGID1).Goal,
If(goalGG2 =true,
LookUp('Group Goals', ID = _GGID2).Goal)))))))'

 

This code brings in the title for the goal. I use it multiple times to grab other items like the goal description and the due date.

 

Each goal has a button next to it, which is what changes values like goalFirst and _goal1. Does anyone know how I can lookup the specific value for a choice-based column? I'd like the status of the goal to appear when a review is being conducted, so that a manager can mark it as completed if it has been. I will include an image of the code as well as the screen in my app. 

 

Aurora_0-1669227594893.png

 

After all goal items are verified, I collect the values from each field on the screen with collect, and then patch any changes to the original data source. I would like to do this with the choice column as well. 

 

Does anyone have any suggestions for how I can achieve this? 

  • Aurora Profile Picture
    364 on at
    Re: How to lookup a choice column value

    I have tried: 

     

    If(goalFirst= true,
    LookUp('Goal Managements',Goal=_goal1, Choices('Goal Managements'.'Achieved?')),
    If(goalSecond= true,
    LookUp('Goal Managements',Goal=_goal1, Choices('Goal Managements'.'Achieved?')),
    If(goalThird= true,
    LookUp('Goal Managements',Goal=_goal1, Choices('Goal Managements'.'Achieved?')),
    If(goalFourth= true,
    LookUp('Goal Managements', Goal=_goal1, Choices('Goal Managements'.'Achieved?')),
    If(goalFifth= true,
    LookUp('Goal Managements', Goal=_goal1, Choices('Goal Managements'.'Achieved?')),
    If(goalGG1 = true,
    LookUp('Group Goals', ID = _GGID1, Choices('Group Goals'.'Achieved?')),
    If(goalGG2 =true,
    LookUp('Group Goals', ID = _GGID2, Choices('Group Goals'.'Achieved?')))))))))

     

    but I get an error saying it expects some "column of simple views (such as text or numbers)" , and the values in my droopdown are [Object, Object] & [Object, Object].

     

    The values that should be returned are just "Yes" or "No"

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard