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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,161)