cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OsmandFernando
Post Prodigy
Post Prodigy

How to copy a text from a label to a datacard?

Dear Experts, 

 

I want to do a very simple operation in my app. I want copy a text from a label to a Datacard field when I tick/check a box ? Screen attached, 

Value 53.33 is the Averagecost (label name)

That amount should show in the Unit price Datacard when I tick the box, 

 

How can I do it?

 

Capture.JPG

 

Osmand

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@OsmandFernando 

 

Put this code in the OnCheck property of the button

Set(myUnitPrice, Label_UnitPrice.Text);
Set(myReset, true); Set(myReset, false);

 

Then use this code in the Default property to make the value appears when the button is clicked

myUnitPrice

 

This code goes in the Reset property of the button to trigger the new value's appearance

myReset

 

Finally, put this code in the OnVisible property of the screen to ensure the initial value in the field is blank

Set(myUnitPrice, Blank())

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@OsmandFernando 

 

Put this code in the OnCheck property of the button

Set(myUnitPrice, Label_UnitPrice.Text);
Set(myReset, true); Set(myReset, false);

 

Then use this code in the Default property to make the value appears when the button is clicked

myUnitPrice

 

This code goes in the Reset property of the button to trigger the new value's appearance

myReset

 

Finally, put this code in the OnVisible property of the screen to ensure the initial value in the field is blank

Set(myUnitPrice, Blank())

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thank you so much @mdevaney 

 

Great support

Osmand

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,487)