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

Set Default Selection of Combobox when coming from the DetailScreen

I have a ComboBox with a dropdown list using ClearCollect in the first screen to set the dropdown values.  When viewing an existing record in the DetailScreen you can see the dropdown value that was selected (5cm), however when you then go into the EditScreen, this value disappears.  How do I get the EditScreen to show the dropdown values that have already been selected and saved on the record (it's a table in SP)?

 

The Dropdown list is on the Size Pricked field:

Screen Shot 2019-03-18 at 1.45.33 PM.jpgDetailScreenScreen Shot 2019-03-18 at 1.45.58 PM.jpgEditScreen

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Set Default Selection of Combobox when coming from the DetailScreen

Hi @LeonieW ,

Could you please share a bit more about the formula that you typed within the Items property of the Size Pricked Combo Box within your Edit form?

Do you set the Items property of the Combo Box to a Collection?

Further, could you please share a bit more about your Collection?

 

I have made a test on my side, please take a try with the following workaround:8.JPG

 

7.JPG

Set the OnStart property of the App control or OnVisible property of the first screen to following:

ClearCollect(SizeCollection, "5cm", "10cm", "25cm","45cm", "1m", "2m")

Set the Items property of the ComboBox to following:

SizeCollection

Set the DefaultSelectedItems property of the ComboBox to following:

{
    Value: "5cm"
}

On your side, you should type:

{
    Value:  ThisItem.'Size Pricked' /* <-- 'Size Pricked' represents the column in your SP list, which used to store the ComboBox value */
}

Or

{
    ColumnName:  ThisItem.'Size Pricked'   /* <-- ColumnName represents the column from your collection, which you displayed within the ComboBox */
}

More details about setting a Default value for Combo Box control, please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Community Support Team _ Kris Dai
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Set Default Selection of Combobox when coming from the DetailScreen

Hi @LeonieW ,

Could you please share a bit more about the formula that you typed within the Items property of the Size Pricked Combo Box within your Edit form?

Do you set the Items property of the Combo Box to a Collection?

Further, could you please share a bit more about your Collection?

 

I have made a test on my side, please take a try with the following workaround:8.JPG

 

7.JPG

Set the OnStart property of the App control or OnVisible property of the first screen to following:

ClearCollect(SizeCollection, "5cm", "10cm", "25cm","45cm", "1m", "2m")

Set the Items property of the ComboBox to following:

SizeCollection

Set the DefaultSelectedItems property of the ComboBox to following:

{
    Value: "5cm"
}

On your side, you should type:

{
    Value:  ThisItem.'Size Pricked' /* <-- 'Size Pricked' represents the column in your SP list, which used to store the ComboBox value */
}

Or

{
    ColumnName:  ThisItem.'Size Pricked'   /* <-- ColumnName represents the column from your collection, which you displayed within the ComboBox */
}

More details about setting a Default value for Combo Box control, please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Community Support Team _ Kris Dai
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

LeonieW
Level: Powered On

Re: Set Default Selection of Combobox when coming from the DetailScreen

That's perfect thank you! Yes, I'm using ClearCollect, it was the instruction for this that did the trick:

 

Set the DefaultSelectedItems property of the ComboBox to following:

{
    ColumnName:  ThisItem.'Size Pricked'   /* <-- ColumnName represents the column from your collection, which you displayed within the ComboBox */
}

I'm using a SP list, so putting in the column name has solved the problem.

 

You've saved me so much time - thank you.

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 (4,655)