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 / How do get record data...
Power Apps
Answered

How do get record data outside of a form?

(0) ShareShare
ReportReport
Posted on by 831 Moderator

I have a form that gets populated with a gallery selection. This all works great. What I want to be able to do is show the data populated in two of the data cards outside of the form in labels. How do I do this?

 

More detail

The form is showing the end user marketing campaign information. The two data cards in question contain a URL and campaign name. Both these values are used by the end user. They copy and paste them into their marketing platforms. My initial thought to make the process easy was to add a button or icon and use the Copy() function to grab the data. The problem is that the form is in view mode unless they hit the edit button. Because the form is in view mode you can't click any buttons in the form. Toggling the form to edit mode just to click a copy button is not user friendly. The idea is grab this data and put(copy) it outside of the form so they can use a copy button at all times.

Categories:
I have the same question (0)
  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @futr_vision 

     

    I assume you currently populate your form by doing something like in the OnSelect property of the gallery:

     

    Set(varRecord, ThisItem);

     

     

    Then the Items property of your form you have: 

     

    varRecord

     

     

    To copy data from the form (in view mode) using a button, create a new variable in the OnSelect property of the button:

     

    Set(varRecordURL, varRecord.URL);

     

     

    Then for your label control Text property:

     

    varRecordURL

     

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • Verified answer
    futr_vision Profile Picture
    831 Moderator on at

    @AARON_C 

    Thanks. I'm not setting the form with the gallery at all using OnSelect. I am setting the Items property of the form to Gallery.Selected. 

     

    This solution actually gave me an idea to try something. Instead of fiddling with the form why not us the OnSelect of the gallery item to set the variable like this:

     

    UpdateContext({varFullURL: ThisItem.'Full URL'})

     

    This seems to work well. It populates whenever a gallery item is selected. Then I can add a copy icon/button and add this code its OnSelect:

     

    Copy(varFullURL)

     

    See any drawbacks to this approach?

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @futr_vision 

     

    Yes, that would also work. That shows in the Label as soon as the gallery is selected. The Copy function also saves the text to your clipboard.

     

    I thought you wanted it to show in the labels when the copy button is pressed (my first post).

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

     

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard