Skip to main content

Notifications

Community site session details

Community site session details

Session Id : sh9LO+eypj7YY5Q1OoWxjX
Power Apps - Building Power Apps
Suggested answer

Setting Drop Down items based on multiple Yes/No Columns

Like (1) ShareShare
ReportReport
Posted on 15 Mar 2025 17:11:42 by 6
I'm not sure how I would do this.
 
I have a SharePoint list. The list has a unique People field. It has multiple columns including columns that are named Budget1, Budget2, Budget3. The budget columns are Yes/No type.
 
On App Startup takes the logged in user and sets variables from the list. This works for the other columns fine.
 
I want a drop down box that will list each column name where the Budget* column is YES.
 
For example:
user<at>email.com          Budget1 = YES, Budget2 = NO, Budget3 = YES.
 
The drop down should show Budget1, Budget3.
 
The column names may increase in future so ideally I want to search for any column that starts with "Budget" rather than add each one manually to any code
  • Michael E. Gernaey Profile Picture
    36,186 Super User 2025 Season 1 on 15 Mar 2025 at 21:54:01
    Setting Drop Down items based on multiple Yes/No Columns
     
    They didnt want to hardcode any names in although i do agree with your code, it would work.
     
    I think @AndrewManning is looking for something dynamic. Which requires you more to either
    A) have a list of field names stored somewhere, that you can grab and use that as a way to get it
    B) use the HTTP SharePoint to call get the field names, filter on ones with Budget then grab the value, then using the output of that in your combobox.
     
     
  • Suggested answer
    vipuljain03 Profile Picture
    306 on 15 Mar 2025 at 19:04:11
    Setting Drop Down items based on multiple Yes/No Columns
    1. Modify the App OnStart property:
    Set(varUserData, 
        LookUp(SharePointList, PeopleColumn.Email = User().Email)
    );
     
    2. Extract Budget Columns:
    ClearCollect(
        colBudgetColumns,
        If(varUserData.Budget1, {ColumnName: "Budget1"}),
        If(varUserData.Budget2, {ColumnName: "Budget2"}),
        If(varUserData.Budget3, {ColumnName: "Budget3"})
    );
    Note: If you anticipate more columns in the future, you will need to update this list manually.
     
    3. Bind to dropdown:
    Set the Items property of dropdown to: colBudgetColumns
    Set the Value property of dropdown to: ColumnName

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,442 Most Valuable Professional

Leaderboard
Loading started