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

Numbered Dropdowns in Gallery cannot equal each other

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Numbered Dropdowns in Gallery cannot equal each other

@mitchellk 

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.

_____________________________________________________________________________________
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.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Numbered Dropdowns in Gallery cannot equal each other

@mitchellk 

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.

_____________________________________________________________________________________
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.
mitchellk
Level: Powered On

Re: Numbered Dropdowns in Gallery cannot equal each other

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

Super User
Super User

Re: Numbered Dropdowns in Gallery cannot equal each other

@mitchellk 

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...

_____________________________________________________________________________________
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.
Super User
Super User

Re: Numbered Dropdowns in Gallery cannot equal each other

@mitchellk 

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.

_____________________________________________________________________________________
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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,206)