cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
unimpressed
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.

LozzieD
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?

MK1
Level: Powered On

Re: Set Control Value/Text OnChange

Hi

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.

 

Thanks,

Mk

Anonymous
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?

upstreampsspa
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) 

Zunair-
Level: Power Up

Re: Set Control Value/Text OnChange

create:

TextBox01

TextBox02

Dropdown1

 

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

 

 SNAG_Program-0000.gif

dipique
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.

Zharris
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.

Helpful resources

Announcements
thirdimage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 277 members 5,241 guests
Please welcome our newest community members: