cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FelipeCaru
Advocate V
Advocate V

"Reset" a text label and/or "unselect" a listbox item

Hello all,

I made a droplist/combobox by following the answer here:
https://powerusers.microsoft.com/t5/General-Discussion/PowerApps-Dropdown-Options-amp-Labels-Are-Cut...

The question I have is: how can I make it so if I save the form and that selected 'text', when I go to editscreen again, instead of showing the selected option, the text label either is "" (empty) and/or the option selected in the list that gives the textlabel its value, it is "unselected" thus not giving the text label a value.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @FelipeCaru ,

Just an update -- If you want to reset the DataCardValueN label and unselect the Listbox item within the Edit form when you edit an existing record, please set the Default property of the ListBox (ListBox1) to following:

""

Note: If you want to reset your ListBox, please do not bind the Default property to the Choice column value of the current item.

 

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

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

Hi @FelipeCaru 

 

Can you please confirm:
1: If update property of your column corresponds to <<Dropdown>>Selected? It expects a record value.
2: What is the default value of your dropdown? Check if it is ThisItem.<<attribute>>
 
If these two things differ, please make the change and try to fetch the details again.
 
Thanks,
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
v-xida-msft
Community Support
Community Support

Hi @FelipeCaru ,

Could you please share a bit more about your scenario?

Do you want your custom Dropdown component to display the selected option/value when you edit an submitted record in your Edit form?

 

I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following workaround:9.JPG

 

10.JPG

Set the OnVisible property of the Edit screen to following:

UpdateContext({showList: false})

Set the Default property of the ListBox to following:

If(!IsBlank(ThisItem.Status.Value), ThisItem.Status.Value, "")

On your side, you should type:

If(!IsBlank(ThisItem.YourChoiceColumn.Value), ThisItem.YourChoiceColumn.Value, "")

Set the Text property of the DataCardValueN label to following:

If(!IsBlank(ListBox1.Selected.Value),ListBox1.Selected.Value, "")

Please check the following GIF screenshot for more details:Test.gif

I have also provided a sample app, please check the following attached Sample app.

 

Please check if you have bind the ListBox within your Edit form to the Choice column in your SP list property. And have typed above proper formula within the Default property of the ListBox and the Text property of the DataCardValueN label.

 

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.
v-xida-msft
Community Support
Community Support

Hi @FelipeCaru ,

Just an update -- If you want to reset the DataCardValueN label and unselect the Listbox item within the Edit form when you edit an existing record, please set the Default property of the ListBox (ListBox1) to following:

""

Note: If you want to reset your ListBox, please do not bind the Default property to the Choice column value of the current item.

 

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

@v-xida-msft 

Thank you, that was indeed what I needed.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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