cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KroonOfficeSol
Level 10

Re: How To set the selected value of a combo box to one of the choices using PowerApps

What you want is the second dropdown to react on the first and on the occassion that there is just one result in the second combobox you want to auto select this result. To do this do the next:

 

[Combo2].Items

 

ShowColumns(Filter(DropDown2,C1 = ComboBox1.Selected.Value1),"C2","C1")

[Combo2].DefaultSelectedItems

 

 

If(CountRows(Filter(DropDown2,C1 = ComboBox1.Selected.Value1)) = 1,First(Filter(DropDown2,C1 = ComboBox1.Selected.Value1)))

 

Basically you take the same filter formula from the Items part and count the rows. When this is 1 then you take the first record from the filter and set this as default. When it is not 1 then this part is in fact just false, like as you dont set a defaultselected item.

 

On the label (or textbox default) you can do a few things, like:

 

ComboBox1.Selected.Value1 & " - " & Coalesce(ComboBox1_1.Selected.C2)

Or when you don't want the minus sign to be visible this:

ComboBox1.Selected.Value1 & If(!IsBlank(ComboBox1_1.Selected.C2), " - " & ComboBox1_1.Selected.C2)

 

 

Unfortuately there is no [Combobox].CountItems on this moment, this would make this a lot easier.  On the idea board there is a threat off mine on this topic, maybe you can give this kudos?

 

 

Hope this works for you.

 

greatings Paul

 

MK1
Level: Powered On

Re: How To set the selected value of a combo box to one of the choices using PowerApps

Hi,

In my screnario,

I need to get values into the dropdown from a swagger custom connetion.

 

Is there any way to get values from swagger into a dropdown.

i tried to get user infromation using custom connection, but here i'm trying to get more than 10 values into a dropdown using a custom swagger connection.

Please let e know if anyone have tried this.

 

Thanks in advance

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 189 members 3,670 guests
Please welcome our newest community members: