cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Specoop
Advocate II
Advocate II

Items: Separate dropdowns, cannot duplicate answer

My situation: I have a 2 SharePoint Choice Columns. Each Choice column contains 3 possible answers of different animals (dog, cat, elephant). 

 

In my PowerApp, I have 2 different dropdowns:

 

Dropdown1: Favorite Animal

Dropdown2: Runner-up Favorite animal

 

My goal - for a user to not be able to select the same animal for both the favorite animal and the runner-up.

 

I was kind of able to make this work for one of the two dropdowns (Items) with a Filter(Choices(List.Animal), Value <>RunnerUp.Selected.Value). But when I added this to the other dropdown, it told me that I was creating a loop and gave me an error.  I tried RemoveIf, but it didn't like that behavior.

 

Any ideas?

 

Thanks PowerApps community!

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Specoop 

This is correct, you will get a circular reference when you try to apply to both.

My suggestion would be to compare the two dropdowns on the Visible property of a warning label that states you cannot choose the same animal.

i.e.  The Visible property of the Label would be:  Dropdown1.Selected.Value = Dropdown2.Selected.Value

This would alter the user that they need to change the choice.

 

Otherwise, what you are trying to do on the choices is possible...but it is MUCH more work.  So, it depends on how much work you want to do and if the label warning might just be good enough.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Specoop 

This is correct, you will get a circular reference when you try to apply to both.

My suggestion would be to compare the two dropdowns on the Visible property of a warning label that states you cannot choose the same animal.

i.e.  The Visible property of the Label would be:  Dropdown1.Selected.Value = Dropdown2.Selected.Value

This would alter the user that they need to change the choice.

 

Otherwise, what you are trying to do on the choices is possible...but it is MUCH more work.  So, it depends on how much work you want to do and if the label warning might just be good enough.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Specoop
Advocate II
Advocate II

Thank you kindly for the quick reply! Understand there's not a simple solution at this time -- and will work just fine to have an error message. I've implemented on my end and it works well - thank you kindly for your expertise and time.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (5,270)