cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MikeLockwood
Level 8

Textbox OnChange event clears Textbox value

So,

 

I have a SharePoint PowerApp Form.  Based on the changing the value of a TextBox I update the dropdown status of the record using the following Patch Statement. This is triggered on the TextBox onChange  event, which fires once I leave the control.

 

 

If(Not(DataCardValue14.Selected.Value = "Submitted to SAP"),  Patch('Project Procurement',SharePointIntegration.Selected,{Stauts:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:1,Value:"Submitted to SAP"}}))

This works perfectly but now the value that was typed into the initial TextBox to start this process has been deleted.  I dont understand why this happens and can't figure out how to resolve the issue.

Thanks,
Mike L.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Textbox OnChange event clears Textbox value

Hi @MikeLockwood,

 

What is the formula that you use with the dropdown control? Also, did you mean that this used to work but suddenly starts to have this issue?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MikeLockwood
Level 8

Re: Textbox OnChange event clears Textbox value

Mona,

 

1st the dropdown control is bound to a a field within a SharePoint list.  All the fields on the page are bound to the same Sharepoint list.  The dropdown is bound to a choice list.  The dropdown functionality is working fine.  The problem is the value in the text box is removed when the script is ran.  

 

2nd, No this never worked but it seems so simple that it should.  When the value in field 1 changes set the value in field 2.

 

Thanks for the help.

Thanks,
Mike L.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,196)