cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tperry
Frequent Visitor

Dropdown "Required" not working

I have a dropdown that is required and the little star near the input name is visible in the browser and goes away when the user selects something in the dropdown, however, this behavior does not transfer to the app for some reason. In the app, the star is never visible. Another issue is that even in the browser AND in the app the user can move on to the next page without selecting anything.

What am I doing wrong?

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @tperry ,

How do you make the drop down "required"?

Is it a required field in the data source or have you coded something in the submit form logic?

It is only a required field in the app, I do not yet have anything making it required in the data source. 
All the other required fields work, but this one. 

Hi @tperry ,

A bit strange, but not an issue - you can control this on the submit form - something like (I will use MyField1, MyStar1 and a Variable vError). So on the Save button

If(
   isBlank(
      MyField1.Selected.Value   //last bit may be different depending on the source of the data
      ),
      UpdateContext({vError:true}),
      UpdateContext({vError:false})
)

Also include UpdateContext({vError:false}) on screen exit and/or entrance.

The Visible property of the MyStar1 would be vError.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Geet1996
Advocate I
Advocate I

Hey, 

I am facing some similar issue. My question to you @tperry is how to got on dropdown hovertext "Select Option". My datasource is excel, I am getting the dropdown values from excel table. Please suggest me how to add one more item to this dropdown something like hover text/ default "Please select option". Thanks & looking forward... 

Best Regards, 

Geetanjali 

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 (2,239)