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

Default values not displaying for dropdowns

Hi All,

We have few dropdowns they are dependents(Cascading dropdowns). 

We have a other screen which captures the user preferences and storing in sharepoint list. I want to display these sharepoint user preferences as default values for the dropdowns(Cascading dropdowns).

 

Tried with the below different types of code with necessary changes for all dropdowns default property.

If(CountRows(Filter(colUserPrefer,MailID=User().Email).Location)>=1,
LookUp(LocCollection, Result=First(colUserPrefer).Location, Result))

 

If(CountRows(Filter(colUserPrefer,MailID=User().Email).Location)>=1,
LookUp(colUserPrefer,MailID=User().Email).Location,"BCD");

 

Above code not working for all dropdowns. 

 

Note: Default values should be populate once we logged in to the app(First Time).

 

Can someone guide me how to implement this one.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @BKGOUD ,

Do you want to display  "Select Floor" by default and  "Select Floor" is not one of the items of the drop down?

Actually, the best way is to use combo box instead of drop down.

Since drop down should display one item by default and that item should be one of the item of the drop down's Items.

So in your issue, you need to add an item "Select Floor" to the drop down's original items, then you could make this as the default selected item.

However, if you use combo box, combo box could display no item by default and display text by default, no need to add this text to its Items.

 

You just need to set the combo box's DefaultSelectedItems to blank

Then set its InputTextPlaceholder:

"Select Floor"

 set its Items to the formula that you put in the drop down.

set the combo box's to allow searching. (or else it can not display InputTextPlaceholder)

What's more, you should transfer number to text in the combo box's Items.( or else it can not allow searching)

When updating, use Value() function to transfer back.

If you do not know make to set this, please show me your drop down's Items and the related fields data type.

 

 

Then the combo box's Items will be the numbers, it will display "Select Floor" by default.

9159.PNG

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Hi @BKGOUD ,

What is the collect code for the two collections and what results are you actually getting?

Highlighted

Hi @BKGOUD ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Highlighted
Community Support
Community Support

Hi @BKGOUD ,

Do you mean that your drop downs could not display default value correctly?

Could you tell me:
1)the fields data type in your sharepoint list?

2)formulas in the drop downs' Items?(list all)

3)formulas in the drop downs' Default?(list all)

4)the number of the drop downs?

5)the relationship between the drop downs?

6)whether do you put the drop downs inside a form or outside a form? If inside a form, the form's settings?

 

The key point about setting a drop down's Default:

the result that the formula should be a value, not record or table.

The value should has existed in the drop down's Items.

 

Or else, the default value could not display correctly.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

@v-yutliu-msft  Thanks for the reply.

 

I want to bind the sharepoint list values(number) to dropdown control, am able to bind the values but i want default valuse should be "Select Floor"(Text). Please guide how can i achieve this one. 

Highlighted

Hi @BKGOUD ,

Do you want to display  "Select Floor" by default and  "Select Floor" is not one of the items of the drop down?

Actually, the best way is to use combo box instead of drop down.

Since drop down should display one item by default and that item should be one of the item of the drop down's Items.

So in your issue, you need to add an item "Select Floor" to the drop down's original items, then you could make this as the default selected item.

However, if you use combo box, combo box could display no item by default and display text by default, no need to add this text to its Items.

 

You just need to set the combo box's DefaultSelectedItems to blank

Then set its InputTextPlaceholder:

"Select Floor"

 set its Items to the formula that you put in the drop down.

set the combo box's to allow searching. (or else it can not display InputTextPlaceholder)

What's more, you should transfer number to text in the combo box's Items.( or else it can not allow searching)

When updating, use Value() function to transfer back.

If you do not know make to set this, please show me your drop down's Items and the related fields data type.

 

 

Then the combo box's Items will be the numbers, it will display "Select Floor" by default.

9159.PNG

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,715)