Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

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.

Level: Powered On

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?

Level: Powered On

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?

Level: Powered On

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) 

Level: Power Up

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



Level: Powered On

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.

Level: Power Up

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.

Level: Powered On

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?

Helpful resources

New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,063)