cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Joko
Helper II
Helper II

Update Text property of Label by the previous button clicked

Hi there,

 

Is there a way to auto populate a label/text field by the name of the button name previously clicked?

 

I have a screen which shows 30 computers.  When you click on a computer (button) i would like that name to show up on the popup window without me having to make 30 seperate computer popup windows?

 

Sorry if i haven't explained that the best.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
panand99
Impactful Individual
Impactful Individual

Hi @Joko 

 

You can create a local variableon select of button by using on each computer(button)

like in computer 1: UpdateContext({varComputer:"comp1"})

and in computer 2: UpdateContext({varComputer:"comp1"})

 

and on your lable defualt text- varComputer.

 

 

View solution in original post

3 REPLIES 3
panand99
Impactful Individual
Impactful Individual

Hi @Joko 

 

You can create a local variableon select of button by using on each computer(button)

like in computer 1: UpdateContext({varComputer:"comp1"})

and in computer 2: UpdateContext({varComputer:"comp1"})

 

and on your lable defualt text- varComputer.

 

 

Thanks for the quick reply.

 

So then i would just have to change all 30 computers with the computer name in the varComputer?

 

Am i right in thinking i cannot import the previous .text from the label?

panand99
Impactful Individual
Impactful Individual

Yes, i think it is the best way to use it beacuse Lable can`t store the values on thier own.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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