cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

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

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
Highlighted
Dual Super User
Dual Super User

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

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!
Highlighted
Community Support
Community Support

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

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.
Highlighted
Community Support
Community Support

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

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

Highlighted
Advocate V
Advocate V

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

@v-xida-msft 

Thank you, that was indeed what I needed.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,214)