cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SarimDeaza
Level: Powered On

Autoselect dropdown answer from previous dropdown selectio

Hi All,

 

I am trying to figure out the following formula, in which there are 2 dropdowns (Dropdown #1: Colors, Dropdown #2: Status) 

 

If the Dropdown Colors is selected to Red, then the dropdown status must be N/A. I want this field to be autopopulated. 

 

eg: OnSelect: IF(Datacardvalue.selected.value="Red", "N/A") 

 

Dropdown 1 Options - Dropdown 2 options

Red - N/A [Automatically select this option]

Green - Processed [Automatically select this option]

All other colores - (Selected all other options from the dropdown list) 

 

This formula does not autoselect the dropdown status of N/A. There are currently 3 dropdown options in this field N/A, Pending, Processed .

 

 

 

Thank you

 

 

3 REPLIES 3
Super User
Super User

Re: Autoselect dropdown answer from previous dropdown selectio

@SarimDeaza 

You had mentioned the OnSelect action in your message.  It appears perhaps you are trying to change the value of the second dropdown when the first is selected?  If that is the case, this is not something you can do in PowerApps.  You can't directly assign values to another control.  However, your other control can observe value in other controls.

So, in this case, consider setting the Default property of the second drop down to the following:

Switch(DataCardValue.Selected.Value,
   "Red", "N/A",
   "Green", "Processed"
)

This should work for you, but is also dependant on the Items property of the second dropdown.

 

Give this a try and see if you have success and it is what you want.

 

I hope that it is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: Autoselect dropdown answer from previous dropdown selectio

Hi @SarimDeaza ,

Do you want to auto-populate the Status Dropdown (Dropdown # 2) box based on the selected value within the Colors Dropdown box (Dropdown #1)?

Could you please share more details about the formula you typed within the Items property of the Dropdown #2 box?

 

Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:4.JPG

Set the Default property of the Dropdown #2 (Status Dropdown box) to following:

If(
Dropdown1.Selected.Value = "Red",
"N/A",
Dropdown1.Selected.Value = "Green",
"Processed",
"Pending"
)

Please check the following GIF screenshot for more details:Test.gifGIF Screenshot

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SarimDeaza
Level: Powered On

Re: Autoselect dropdown answer from previous dropdown selectio

Thank you for your response @v-xida-msft.

The formula that you mention is the same that we are trying to use since the post Smiley Sad, however, when we try to start the formula PowerApps shows us an error:

If(DataCardValue21.Selected.Value="Red", "N/A"...)
Error Message: Expected Record Value

Do you suggest anything else? Smiley Happy

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 284 members 3,659 guests
Please welcome our newest community members: