cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tejaswini1234
Helper IV
Helper IV

how to clear textbox value when drop down list is changed  when sharepoint list is customized in power apps

there is one drop down list and textbox datacards on form , when drop down list changed its text box value should be clear

3 REPLIES 3
yashag2255
Dual Super User II
Dual Super User II

Hi @Tejaswini1234 

 

If you want to reset the textInput control when a different dropdown item is selected you can use the below expression:
 
Dropdown Control -> OnChange -> Reset(DataCardValue23)
 
Here, DataCardValue23 refers to the name of text input control inside the edit form. This will reset the control to its default value.
 
In case you are editing existing item in your sharepoint list, this will default to Parent.Default value. To update this scenario, you can use below expressions:
 
Dropdown Control -> OnChange -> Set(TextBoxValue,Blank())
TextInput -> Default -> If(IsBlank(TextBoxValue),Blank(),Parent.Default)
 
Here, this will clear the text box.

 

Hope this Helps!

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!

I have used combo box and drop down list , combo box values filtered by drop down list item selected, 

combo box defaultselecteditem is set to 

If(IsBlank(textbox),Blank(),

{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: ThisItem.'Vendors Name'
}
)

 

 

and onchange of dropdownlist:

 

Reset(ComboBox2);Set(textbox,Blank()) 

 

In edit form ,while drop down item changes , combo box value does not change.

 

in edit form,when dropdown item changes, combobox default selected item is not blank.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (29,088)