cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tehdeadhand
New Member

simple button textbox quesiton

Hey im trying to have onbutton press take text from 2 textboes add them and display it into textbox 3.

i can do it in everyother language but power apps is baffling me.

 

something like in vb

 on button press

textbox3.text = textbox1.text + textbox2.text

or

var txtb1

var txtb2

txtb1 = textbox1.text

txtb2 = textbox2.text

textbox3.text = txtb1 + txtb2

 

i cant figure out how to get power apps to update a textbox from a button without assigning the textbox text to a dynamic variable.

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jimmy
Microsoft
Microsoft

PowerApps doesn't provide a way to directly set the formulas for control properties, but you can achieve your desired behavior by using context variables:

 

button.onSelect = UpdateContext({textboxSum: textbox1.text + textbox2.text})

textbox3.text = textboxSum

View solution in original post

hpkeong
Community Champion
Community Champion

Hi

 

Allowed me to share.

- Sum(TextInput1.Text, TextInput1_1.Text)

 

https://powerapps.microsoft.com/en-us/tutorials/function-aggregates/

You can use either:

- Sum( Table, NumericalFormula ), or

- Sum (value1, value2, value3, ...)

 

Is that what you want?

PowerApps can be quite straightforward instead of declaring either local variable or global variable as of other programming language.

 

Hope this helps.

hpkeong

View solution in original post

2 REPLIES 2
Jimmy
Microsoft
Microsoft

PowerApps doesn't provide a way to directly set the formulas for control properties, but you can achieve your desired behavior by using context variables:

 

button.onSelect = UpdateContext({textboxSum: textbox1.text + textbox2.text})

textbox3.text = textboxSum

hpkeong
Community Champion
Community Champion

Hi

 

Allowed me to share.

- Sum(TextInput1.Text, TextInput1_1.Text)

 

https://powerapps.microsoft.com/en-us/tutorials/function-aggregates/

You can use either:

- Sum( Table, NumericalFormula ), or

- Sum (value1, value2, value3, ...)

 

Is that what you want?

PowerApps can be quite straightforward instead of declaring either local variable or global variable as of other programming language.

 

Hope this helps.

hpkeong

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,927)