cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mseto
Helper I
Helper I

Setting Text in One DataCard to Text from another DataCard using Button

Hello,

 

I have a DataCard1, DataCard2 and a Button. I want to click the button and set the text value of DataCard2 to the entered text from DataCard1.

 

I entered this into the OnSelect of the button: Set(Var, DataCardValue1.Text) & DataCardValue2.Text = Var

 

Unfortunately, clicking the button does nothing.

 

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @mseto ,

Set the Default of DataCard1 to DataCard2.Text

On the OnSelect of the button, put Reset(DataCard1)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
PowerAddict
Super User
Super User

Are you getting an error or is the value just isn't getting copied over?

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

PowerAddict
Super User
Super User

One quick suggestion: 

 

For DataCardValue2, set the Default property to the variable Var. 

 

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

WarrenBelz
Super User
Super User

Hi @mseto ,

Set the Default of DataCard1 to DataCard2.Text

On the OnSelect of the button, put Reset(DataCard1)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

No errors....just no value

Thank you much Warren and Hardit! It worked!

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 (8,736)