web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Numbered Dropdowns in ...
Power Apps
Answered

Numbered Dropdowns in Gallery cannot equal each other

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am building an app where items are ranked from 1-10 based on which items users like best.  I am using a gallery to display all of the information and i have a dropdown in each item in the gallery that has the numbers 1-10 on it.  Is there a way on a submit button to check and see if any of the dropdowns are equal to each other so i can then give the user an error message?

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Perhaps, but not entirely easy...

     

    You might, before exploring that approach, consider a different angle.  PowerApps provides a much friendlier environment than the ol' "fill in information, click a button, get an error" scenario.  In PowerApps, you can be much more interactive during the processes that all lead up to "Submit".  In fact, ideally, you do not want Submit to ever return an error.

    So, in this case, my suggestion would be that you consider putting in logic formulas to prevent the condition of having equal values at any point in time.  Thus avoiding the submit error issue.

     

    If you need some more guidance or samples on that concept, post back.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Randy,

     

    How would i put logic in the gallery drop down. The dropdown is labeled Dropdown1 for example for each item. How would i compare values or limit values based on what has already been chosen?

     

    Thanks

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    I'll shoot you over a sample later today.  I'm not at a place where I can do that right now.

    But, I believe it will demonstrate to you exactly what I am referring to and show you options for it.

    Back with you later...

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    I've attached an App to this posting that you can take a look at.

    If gives you three different styles of rating and/or ordering of lists.

     

    I didn't get a chance to write up info on it and had put it together some time ago to throw into the Gallery of Apps here on this forum (where I would write it up more).

    But, I wanted to get it in your hands so you could see some of the options you might consider.

    There is a dropdown type rating list in there that you can look at.

     

    To answer one of your specific questions "how would I put logic in the gallery drop down..."

    In the sample, there are two things to look at.  I mentioned that the better option might be to disable the submit until the list is in order.  That sample is in there.  Look at the DisplayMode property of the submit buttons.  You will see that the determination of disable/enable is based on a math formula - that formula is the sum of all the rating (dropdown values) and the triangular number of the list.

     

    Also of interest to you would be the Fill property of the dropdown controls.  There you will see the formula that is used to determine if the number is already "in play".

     

    Check it out and let me know if you have any questions....eventually I will find the time to get this in the Gallery and/or do a video on it.

     

    Hope it helps.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard