Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Help with Combo Box Switch Formula

(1) ShareShare
ReportReport
Posted on by 745
Hello Everyone,
 
I have two SharePoint List, two Combo Boxes and I want to concatenate the options from SPList2 based on the Options selected in SPList1.
All the Choice Columns are Multi select.
 
 
Example:
When you select Option2 & Option3 in SPList1 then with Switch formula you are able to select Option4, Option5 Option6, Option7, Option8 and  Option9
 
I am currently using this Switch formula on the second Combo Box
Switch(ComboBox1.Selected.Value, "Name1",Choices([@'SPList2'].column_1), "Name2",Choices([@'SPList2'].column_2),"Name3",Choices([@'SPList2'].column_3))
 
I hope someone can help.
  • Verified answer
    DBO_DV Profile Picture
    4,530 Super User 2025 Season 1 on at
    Help with Combo Box Switch Formula
    This will just be the new name of the Column I named it Choice. This way I hoped it' clear whtas comming in there: The choice options.
     
    You have to rename the columns, otherwise your table will have empty records. 
     
    Just test it let me know if it doesn't work. 
     
    If this helped solve your question, consider accepting it as Solution so others can find it as well.  You can accept several posts as Solution. 
    If it helped in any other way consider giving it a like so we can keep supporting eachother. 
  • Caleb62881177 Profile Picture
    745 on at
    Help with Combo Box Switch Formula
    @DBO_DV - I am not sure what Choice after the comma.
  • Verified answer
    DBO_DV Profile Picture
    4,530 Super User 2025 Season 1 on at
    Help with Combo Box Switch Formula
     
    How about you try this code in the first Combo Box in the OnChange property:
    Clear(colFinalOption);
    ForAll(
        Self.SelectedItems,
        Collect(
            colFinalOption,
            Switch(
                Value,
                "Option1",
                RenameColumns(SPList2.ColumnChoice1,ColumnChoice1,Choice),
                "name1",
                RenameColumns(SPList2.ColumnChoice2,ColumnChoice2,Choice),
                "name2",
                RenameColumns(SPList2.ColumnChoice3,ColumnChoice3,Choice)
            )
        )
    )
    colFinalOption is then the Datasource that you want to put into your second Combo Box.
    You have to rename the columns, otherwise your table will have empty records. 

    If this helped solve your question, consider accepting it as Solution so others can find it as well.  You can accept several posts as Solution. 
    If it helped in any other way consider giving it a like so we can keep supporting eachother. 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard