Set Label Text on a Button Click or Select – Power Platform – Canvas Apps

Hi Everyone,

I have started on PowerApps and as I am newbie on this, I am trying to understand the things clearly before we do.

Today I got a requirement to set the label text to something onclick of a button, oh.. sorry.. onselect of a button(powerapps terminology :)). I thought, it would be the same way of the statement which we are so used and have written below statement onselect.

lblTextToShow.Text = “Set Label Text from OnSelect Property of the button.”

And, it didn’t work. After some search, understood that we cannot change the text directly like above and we have to use a Variable to do the same.

We have to set the Text property of the label to the Variable (Global or Context) and change the value of the Variable OnSelect of the button and label text would change automatically.

On the Form OnVisible property have given the below formula to set the variable value to Blank() and assigned the same variable to Label Text property on OnSelect Property of the button by setting the value that I want.

Hope this helps.


Happy App Developing
Gopinath.

One thought on “Set Label Text on a Button Click or Select – Power Platform – Canvas Apps

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s