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 / Combo box fields chang...
Power Apps
Answered

Combo box fields change based on selection

(0) ShareShare
ReportReport
Posted on by 221

If something is selected in my combo box, I would like another combo box to change choices based on the first selection. 

 

I have the following formula but am getting this error: 

 

If(ComboBox1_1.Selected="Cables",["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],'null'"

EMA03356_0-1701710989646.png

 

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @EMA03356,

     

    .Selected will result in a record output. You will need extend this with either .Value or .ColumnName (referring to the correct column name)

    If(
     //.Value see above
     ComboBox1_1.Selected.Value = "Cables",
     ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],
     //Added an array format and removed the single quotes
     ["null"]
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • EMA03356 Profile Picture
    221 on at

    If(ComboBox1_1.Selected.Value = "Cables",
    ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],|| (ComboBox1_1.Selected.Value = "Cabinets",
    ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],
    ["null"])

     

    I'm trying to do a second one for an OR statement and it doesn't like the syntax, can you help?

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @EMA03356,

     

    When having multiple possible matches for the same input value, you may want to use a Switch function instead:

    Switch(
     //Combobox1_1 value as input
     ComboBox1_1.Selected.Value, 
     "Cables",
     //If it equals Cables show:
     ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],
     "Cabinets",
     //If it euals Cabinets show
     ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],
     //Else
     ["null"]
    )

    (Should the options change often, you may want to use a table to store them instead with a LookUp column towards the table of dropdown1_1)

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • EMA03356 Profile Picture
    221 on at

    Does switch work if I have up to 8 options I will be adding? 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @EMA03356 that is not an issue as long as your options are meant to be matched with ComboBox1_1.Selected.Value.

     

    Switch(
     //Combobox1_1 value as input
     ComboBox1_1.Selected.Value, 
     "Cables",
     //If it equals Cables show:
     ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],
     "Cabinets",
     //If it euals Cabinets show
     ["Poorly Routed", "Missing Wraps", "Servo Cables Not Tightened", "Not Secured Properly"],
     //Adding additional options is shown below
     "Option3",
     ["Opt3 value"],
     "Option4",
     ["opt4 value"],
     //Else
     ["null"]
    )

     

  • Daniel48 Profile Picture
    46 on at

    @LaurensM Is there a way to edit this switch statement to reference different columns in a SharePoint from one file, instead of the static selections?

     

    Switch(
     //Combobox1_1 value as input
     ComboBox1_1.Selected.Value, 
     "Cables",
     //If it equals Cables show:
     ------'datatable'------ 'specific coulumn1'----
     "Cabinets",
     //If it euals Cabinets show
     ------'datatable'------ 'specific coulumn2'----
     //Adding additional options is shown below
     "Option3",
     ["Opt3 value"],
     "Option4",
     ["opt4 value"],
     //Else
     ["null"]
    )

     

    something like this  instead of the static output 
    I'm experimenting with a master datalist that has all the data for my dropdowns in different columns so I can dynamically retroactively change that data on the fly 

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
Kalathiya Profile Picture

Kalathiya 408

#2
WarrenBelz Profile Picture

WarrenBelz 382 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 328 Super User 2025 Season 2

Last 30 days Overall leaderboard