web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Data transfer from a l...
Power Apps
Answered

Data transfer from a label to a text box

(0) ShareShare
ReportReport
Posted on by 356

Hello community.

Certainly the professionals here were like me today. You fail at the smallest of tasks because you just can't do it yet.

 

Following problem:
I have this screen.

RoScha_1-1599425305016.png

I have only copied the text in the text box below

 

There is a label (Label1) on this screen. This label shows the content of a variable. There is also a pen that serves as an edit mode. With the click on the pen something very simple should happen (and I can't get it again): I want to copy the text from label 1 into a text box so that you can then edit this text in the text box and then save it (this will probably be my next problem).

 

How does it work?

 

Best regards

RoScha

Categories:
I have the same question (0)
  • RoScha Profile Picture
    356 on at

    a question: I was just playing around and this formula here did exactly what I wanted.

     

    TextInput1 = Label1

     

    Is it really that easy to end?

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi there

    assuming the variable

    Set(varThatVariable,"the text to be copied and edited");

    now a variable to control the mode of the text input control

    Set(varDisplayMode,DisplayMode.View) (this can be in the onvisble section of the form)

    set the displaymode property of the textinput to  varDisplayMode

    set the default value of the texinpu to varThatVariable

    The above will have the textinout display as a label.

    on the pen icon's onselect > set the displaymode to Set(varDisplayMode,DisplayMode.Edit) and you can edit the string as you like. when done you can update the comment

     

     

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@RoScha,

    Based on the issue that you mentioned, do you want to copy the Label text content to the TextInput and click the edit button to edit it?

    Could you please share a bit more about the scenario,

    1. Do you want to control the DisplayMode of the TextInput based on the edit button?
    2. How you save the variable, click another button to update?

    I assume that you display the variable into the Label, and then copy the content to the TextInput on clicking the edit button, you could edit the copied content. Finally, you could click another button to update.

    I have a test on my side, please take a try as below.

    I assume that the variable you set in the Label is Var1.

    Set the OnSelect property of the edit button as below:

     

    Set(ButtonClick,true)

     

    Set the Default property of the TextInput as below:

     

    If(ButtonClick,Var1)

     

    Set the Visible property of the TextInput as below:

     

    If(ButtonClick,true,false)

     

    After that, if you want to save the TextInput content to the corresponding variable, you could set the OnSelect property of the save button as below:

     

    Set(Var1,TextInput1.Text)

     

    Best Regards,

    Qi

  • Rick_black Profile Picture
    186 on at

    I am glad to have found this. I am trying to copy data from one textbox to another textbox using a button onclick property. I also want to format the data sent to the textbox by having it separated by commas. Any ideas?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard