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 / Button Onselect to sen...
Power Apps
Answered

Button Onselect to send variable values to DataCardValue

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I have a button labelled 'Paste'. OnSelect I want this button to paste a value into DataCardValue29 on the same screen. The variable (TOO) has been set previously. The code I am trying is below and compiles but doesn't paste.

 

DataCardValue29.Text = TOO;

 

I tried using UpDateContext but without success.

 

Thank you in advance.

 

Rob 

Categories:
I have the same question (0)
  • AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @rob4681 you can use Set Function to set a variable like so:

     

    Set(VarPasteText,TOO)

     

     

    Then have the DataCardValue29 text property to:

     

    VarPasteText

     

    Please click Accept as solution if my post helped you solve your issue. ✔️ This will help others find the solution to this problem. It also closes the item. Remember, you can accept more than one post as a solution.

    If the content was useful in other ways, please consider giving it Thumbs Up. 👍

    Thanks
    Andrew

     

  • rob4681 Profile Picture
    on at

    Am I right in thinking this will update the DataCardValue29 every time? I have already set the TOO variable on a different canvas. I want the option,

    If the paste button is pressed: pass the text of the TOO variable to DataCardValue29

    If the paste button is not pressed: Manual text entry to DataCardValue29 is possible or can be left blank.

     

    Thanks again.

  • Verified answer
    AndrewR1 Profile Picture
    1,572 Moderator on at

    @rob4681 If you put the set on select of the button this will only paste this when the button is selected not evetime you change the TOO variable you could add in a if statement to check that the paste text is blank: 

     

    DataCardValue29 text property to:

     

    If(IsBlank(VarPasteText),"",VarPasteText)

     

     

    Please click Accept as solution if my post helped you solve your issue. ✔️ This will help others find the solution to this problem. It also closes the item. Remember, you can accept more than one post as a solution.

    If the content was useful in other ways, please consider giving it Thumbs Up. 👍

    Thanks
    Andrew

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 514

#2
WarrenBelz Profile Picture

WarrenBelz 419 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 295

Last 30 days Overall leaderboard