Showing results for 
Search instead for 
Did you mean: 
New Member

Re: Set Control Value/Text OnChange

This would be fine if changing the value of the default triggered the onchanged event. Its really annoying that it doesn't.

LozzieD Advocate II
Advocate II

Re: Set Control Value/Text OnChange

But what about the input controls?


When you want to set the input controls, like Checkbox, TextInput, Toggle, etc., via another control, while still allowing the user to input with the UI to the input controls as well, this doesn't seem to be available?


There appears to be no facility for the inut control to "listen" to another control whiel at the same time "listen" to the user input.  If that's the case, then the declarative implementation in PowerApps is not complete.


Or can someone show a way i.e. am I missing something?

MK1 Helper IV
Helper IV

Re: Set Control Value/Text OnChange


In my scenario,

When we try to submit a new request to Add and Remove User.

I have two buttons, Add and Remove on my edit screen.

When we click on Add button ABC datacardvalue should be null.

when we click on Remove button ABC datacardvalue should be "Remove".

And the Datacardvalue should set to null once the form is submitted.

Any ideas how to fix this would help.




Not applicable

Re: Set Control Value/Text OnChange

I applied your solution to my project.  I am trying on OnSelect of Save, it sets my datacard field to No so it can be reprocessed if it is a update.  I have for my Save button is


If(BotProcessed_Var.Text<>"N", BotProcessed_Value.Text="N",BotProcessed_Value.Text ="N"); SubmitForm(EditForm1);NewForm(EditForm1)


I have a text box and OnChange my code is:


If(BotProcessed_Var.Text<>"N", BotProcessed_Value.Text="N",BotProcessed_Value.Text ="N")


On my Datacard it will not let me set the default to BotProcess_Var.Text as it gives a circular reference error so I set it the Default to ThisItem.BotProcessed


When I run it, it will Save and then through me to another screen for some reason instead of bringing up a new screen(EditForm2 instead of staying on EditForm1(New)).  If you go to design mode, it shows the BotProcessed = "N" but when you check Sharepoint, it is still showing "P"

When you bring that record back up it is set to "P" again.  Any ideass on why Sharepoint is not updating?

Regular Visitor

Re: Set Control Value/Text OnChange

I'm trying to figure out how to do the same thing. I've tried using Set, Update, UpdateContext, and even tried messing around with if statements, but nothing seems to work. I'm curently getting an error telling me, "The parameter for this function must be a control with OnSelect property on the same screen." But it is on the same screen! (See attached screenshot) 

New Member

Re: Set Control Value/Text OnChange






set OnScreenVisible value to Set(test, "blah")

set TextBox01 Default value to test

set TextBox02 OnChange value to Set(testTextBox02.Text)

set Dropdown1 OnChange value to If (Dropdown1.Selected.Value="1", Set(test,"blah 1"), Dropdown1.Selected.Value="2", Set(test,"blah 2"), Dropdown1.Selected.Value="3", Set(test,"blah 3")) - This step is not in the video



Frequent Visitor

Re: Set Control Value/Text OnChange

@Zunair-'s solution worked for me, although you'll need to watch the GIF as one formula doesn't contain the `.Clear` method necessary to make the solution function. I'm not entirely sure why it works, but I'm glad it does!


In my case, I was trying to URL encode a project title so I could concatenate it into a link to documents that were assigned to that project. Luckily there is a URLEncode function in PowerApps that can easily be added into this solution.

New Member

Re: Set Control Value/Text OnChange

This makes sense, but I have this problem:

ComboBox2 Items Property
Lookup(DataSource,Name = ComboBox1.Selected.Name,ID)

where I am using the selection from the first box to build the list of items for the second. The functionality works, but it throws up errors at the start, where no value is selected for combobox 1.

Tapesh Post Patron
Post Patron

Re: Set Control Value/Text OnChange

Hi @murali @audrieg @Zharris

I have same issue, i want to get the value from a datacard which will be the default value nut the code always shows and error.

please see :


Name: Amount

Input: DataCardValue72
Datacard2: (InForm2)

Name: WeeklyTotal

Input: DatacardValue8

I don't know what is wrong,

i tried to set the default of amount to DatacardValue8.Text, but it shows error, so what will be next thing to get the value from another Datacard?

Frequent Visitor

Re: Set Control Value/Text OnChange

Hi @Zunair-  

My scenario is almost similar but this solution is not working.

Month-Year Text field is showing default value of Month-Year of selected row in table (visible in 1st image, below the grid).

Table contains 12-2019 to 04-2020 data which is dynamic. Month-Yr drop-down in popup is connected to another dynamic Month-Year table. So once the user selects further Month year from Drop-down., Month-Year value of App should be changed.


And after that when user clicks on OK button. all the text fields (14 text input fields except Month-Year) need to be changed as per another table which is connected with OK button. The table which is connected with OK button has basic details for txtinput but do not contain Month-Year data.


change record.JPGchange record1.JPGchange record2.JPG


Helpful resources

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (8,111)