cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tbruns
Post Patron
Post Patron

Populate a Dropdown Based on the Value of Another Dropdown in PowerApps

New to PowerApps.

 

I have a customized form that I am using to gather info from users then goes in a collection and then patches to a Sharepoint List. I am wanting to auto populate a drop down based on what the user chooses on the previous drop down. Is there an easy way to do this?

 

Thank you!

32 REPLIES 32
KrishnaV
Community Champion
Community Champion

Hi @Tbruns ,

 

for cost center dropdown set the default value to:

Lookup(SpListName,SOW.vaue=sowinput.select.value,"Const Center")// this will get the relevent cost center name for the select SOW.

Apply the same logic for the remaining dropdowns also. 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV That also does not work.

LookUp('Onboard Test List',SOW.Value=SOWInput.Selected.Value,'Cost Center'")

 

Nothing is telling it that If ABC then 123 & 321

KrishnaV
Community Champion
Community Champion

Hi @Tbruns ,

 

if Cost Center is also a choice filed then use as below:

LookUp('Onboard Test List',SOW.Value=SOWInput.Selected.Value,'Cost Center'.Value)

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Still is not working. Can you explain how that function is saying If SOW is ABC then Cost Center should be 123?

KrishnaV
Community Champion
Community Champion

hi @Tbruns ,

 

See the working model below:
Dropdown1.gif

 

For demo I have implemented as below:
dropdown SOW items are: ["Sow 1","Sow 2","Sow 3"]
dropdown costcenter items are: ["Sow 1","Sow 2","Sow 3"]
dropdown costcenter default is: ["Cost Center1","Cost Center 2","Cost Center 3"]

If(Dropdown9.Selected.Value ="Sow 1","Cost Center 1",Dropdown9.Selected.Value ="Sow 2","Cost Center 2","Cost Center 3")

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Yes, your working model is exactly what I am trying to do. Thank you for the visual. So sorry I am not understanding this.

 

I changed the "Items" for SOW to be [12345,67890], instead of being pulled from the sharepoint list.

I changed the "Items" for Cost Center to be [12345,67890], instead of being pulled from the sharepoint list.

I changed the "Default" for Cost Center to be [ABC,DEF] and I receive this error: Issue Expected Record Value. The property on this control expects Record values. The rule produces Table values which are incompatible.

So I removed the ABC,DEF from the "Default" and tried entering If(SOWInput.Selected.Value ="12345", "ABC",SOWInput.Selected.Value ="67890", "DEF")

I received this error: Incompatible type. We can't evaluate your formula because the values being compared in the formula aren't the same type. The left value is a Number and the right value is a Text type.

 

Now what lol? Again I appreciate your patience with me.

KrishnaV
Community Champion
Community Champion

Hi @Tbruns,

 

No problem at all, I have attached the solution for you to download that and open it in make.powerapps.com as below:

File -> Open -> Browse files -> select the solution

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Unfortunately, I am on a work computer and it does not allow me to download items.

KrishnaV
Community Champion
Community Champion

Hi @Tbruns,

 

Again NP, follow the below steps:

  1. Create Dropdown-1
  2. set items to

 

["Sow 1","Sow 2","Sow 3"]​

 

  • Create Dropdown-2
  • Set items to

 

["CostCenter 1","CostCenter 2","CostCenter 3"]​

 

  • on Default property of dropdown-2 set as below:

 

If(Dropdown2.Selected.Value ="Sow 1","Cost Center 1",Dropdown2.Selected.Value ="Sow 2","Cost Center 2","Cost Center 3")​

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 

 



I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a THUMS-UP and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Thank you! That works when I create new drop downs but does not work when I am using the fields from Sharepoint. They are Choice fields on Sharepoint. I get the same errors as above. What do I need to do?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,538)