Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

How to change items of a dropdown based on the selction of another dropdown.

(0) ShareShare
ReportReport
Posted on by 16

I have 2 dropdowns in editform.

 

Items in Dropdown1 and Dropdown2 are - Parent.Allowedvalues.

 

On changing  the selection of value in dropdown1, im creating a new collection called Area and want to display Area values in Dropdown2.

 

Things tried are below:

 

Onchange event of Dropdown1----------

 

Clear(area);
Switch(
DataCardValue24.Selected.Value,"North",
Collect(area,{_eis_area_label:"East Area"},{_eis_area_label:"Causeway Area"},{_eis_area_label:"West Area"},{_eis_area_label:"South Antrim Area"}),
"South",
Collect(area,{_eis_area_label:"North Down & Ards Area"},{_eis_area_label:"South Area"},{_eis_area_label:"South Down Area"},{_eis_area_label:"South West Area"},{_eis_area_label:"Mid Ulster"}),
"Belfast",
Collect(area,{_eis_area_label:"Lisburn & Castlereagh Area"},{_eis_area_label:"South & East Belfast Area"},{_eis_area_label:"North Belfast Area"},{_eis_area_label:"West Belfast Area"}),
Collect(area,{_eis_area_label:""})
);
UpdateContext({RegionSelected:true})

 

items of Dropdown2------------

 

If(RegionSelected=false,Parent.AllowedValues,Distinct(area,_eis_area_label))

 

OnVisible of editablescreen -----------

 

Collect(data,Meetings);
UpdateContext({RegionSelected:false})

 

 

Categories:
  • AnuNampallu Profile Picture
    AnuNampallu 16 on at
    Re: How to change items of a dropdown based on the selction of another dropdown.

    1)Basically, i want dropdown2 to display by defult Parent.AllowedValues and if there is any change in selection of Dropdown1 then area collection should be displayed. 

     

    2)Is it possible to create a collection with Parent.AllowedValues?

    Collect(NewCollection,Parent.AllowedValues) it is saying function collect has some invalid values.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard