normalian blog

Let's talk about Microsoft Azure, ASP.NET and Java!

How to update texts on TextInput with button clicks on PowerApps

I believe it might be first challenge to update text of TextInput because it's a little bit far from intuition steps. Most easiest way to understand how to build up this is to test for yourself. Here is an one of simplest articles to describe the steps.

Simple steps how to update text on TextInput

Open https://create.powerapps.com/studio/ and choose "Blacnk App" by following an image below.
f:id:waritohutsu:20200309052838p:plain

Choose "Insert > Text -> Text Input" to put TextInput control on your app.
f:id:waritohutsu:20200309053016p:plain

Choose "Insert > Button" to put Button Control on your app.
f:id:waritohutsu:20200309053210p:plain

You can find two controls on Screen1 like below.
f:id:waritohutsu:20200309053305p:plain

You need to utilize variable to update the text. Click your InputText control, choose "Advanced" and update Data - Default as variable name - ex. "val01" like below. You can avoid error at this time because this error will be fixed after Button control setup.
f:id:waritohutsu:20200309053431p:plain

Click your button control, choose "Advance" and update "OnSelect" formula like below.
f:id:waritohutsu:20200309054422p:plain

Reset(TextInput1);
UpdateContext({val01 : "hello"});

Debug to update text on TextInput

Execute this test apps and click button, and you can confirm behavior below.
f:id:waritohutsu:20200309054803p:plain