cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnc222
Helper III
Helper III

Force dropdown to select item in dropdown that allows empty selections

Hello All,

 

Hoping some of you guru's out there may know why my approach is not working. I feel like I have googled the ends of the earth and tried multiple approaches at this point without any success. I want to make one dropdown choose its only option if another dropdown is selected and there is a value in a sharepoint list ( to check if the "spot" is empty or not). This is so the user cannot select an "inbound" option without also selecting the "outbound". This dropdown also needs to remain selectable as empty so the user can submit with no options selected for either. 

 

Currently using a notification message to remind user to select the option but i would like to make this more streamlined and just auto select it for them. 

 

Below is a snip of what I have tried to do - without success. Please anyone out there!!

 

johnc222_0-1639362523129.png

johnc222_1-1639362594910.pngjohnc222_2-1639362611933.pngjohnc222_3-1639362643917.png

 

 

6 REPLIES 6
johnc222
Helper III
Helper III

@WarrenBelz  

@RandyHayes 

You both helped me in the past - hoping you might know more? I'm sure I'm overlooking something simple. 

RandyHayes
Super User
Super User

@johnc222 

Can you describe more about your datasource information, like what is Items in your datasource?

Also, the formula you showed...where is that? What property?

Not exactly following the flow of what you are showing in your pictures. 

A little more info would be helpful.

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

Thanks for the reply @RandyHayes , 

 

Data source is two sharepoint lists, filtered via choices to show "railcar" that is full in a specific location. 

a 'staged' list for railcars on a spot - and one for those in a railyard. 

Above code snippet is currently located in OnChange for B211INBOUND dropdown. Trying to force B211OUTBOUND dropdown to choose the first / only choice if the 'B211' Track is already full. 

 

I believe the issue is somehow the use of .Railcar? I have googled this type of setup and all of the solutions do not seem to work with my setup. 

 

johnc222_0-1639571880094.png

 

IE: So user cannot select inbound without also selecting outbound. Hopefully the info above helps some? 

 

RandyHayes
Super User
Super User

@johnc222 

Very good.

So, what is the Items property of the Inbound dropdown and what is the Items property of the Outbound dropdown?

And again...the formula you showed in your post - where is that?  What control? What action?

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

Hello @RandyHayes

I don't believe there is anything in the Items property, this was merely an attempt at a solution for something similar I had found on these forums.  

 

Hopefully below will help display what I am attempting to get it to do. 

 

johnc222_0-1639696365397.png

User selects a railcar for 'inbound' in the same spot, but there is currently one in the same spot. 

At this point it should force the selection for 'outbound' so user cannot over-write without choosing available outbound option. Currently this 'outbound' option is left as default as an empty choice, and needs to stay as empty choice in order for the rest of the app to work properly. 

 

johnc222_1-1639696505840.png

 

 

 

johnc222
Helper III
Helper III

@RandyHayes Had previously tried this method - but it does not seem to work. Do not know enough to get this portion working as intended. No errors but the 2nd dropdown selection does not change. 

 

johnc222_4-1639697947922.png

 

 

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,537)