Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Paste Gallery to Another Screen Formatting is Not Retained

(0) ShareShare
ReportReport
Posted on by 53

I have a gallery control formatted with substantial data, when I copy (G1 Below) and paste into another screen, formatting is lost. While it’s pasting you can see the format is retained; however when the task is complete the formatting is lost (G2 Below). The Width, X & Y properties convert to “1” or Null.

 

If you create a component and Copy & Paste the Gallery into the Component and then insert the component into a responsive container, the format is retained; however components a Not Responsive.

How can I cut and past and retain formatting...Thanks

 

G1

 

Syvenn_0-1670777372596.png

 

 

G2

Syvenn_1-1670777372598.png

 

Categories:
  • Suggested answer
    philip_dt Profile Picture
    philip_dt 12 on at
    Paste Gallery to Another Screen Formatting is Not Retained
    This is a terrible bug and it affects copy/pasting even in the same Screen.
     
    I created a diff of the changes when you copy paste: https://www.diffchecker.com/X9AgApYj/
     
    You can see some Width values copy across just fine, others are either not pasted at all or are set to something else. X values seem to be the worst affected but this doesn't seem to be due to them having a complex formula as even simple integer values just vanish/change. Also, Height values with complex formula are unaffected.
  • LennartWalldén Profile Picture
    LennartWalldén 165 on at
    Paste Gallery to Another Screen Formatting is Not Retained
    I think it's a bug that you can't copy an existing gallery and paste it in a container. The X,Y and Width values should be maintained. You can Copy&Paste galleries acrioss screens with all properties maintained, so it should be possible.

    For us with big apps that was built before we had the container control, it's quite a lot of work to build a component rather than just Copy & Paste, if we want it responsible or just use containers as structure elements.
     
  • Verified answer
    VJ-22072138-0 Profile Picture
    VJ-22072138-0 53 on at
    Re: Paste Gallery to Another Screen Formatting is Not Retained

    Understood, thanks for the reply!

  • LaurensM Profile Picture
    LaurensM 12,510 on at
    Re: Paste Gallery to Another Screen Formatting is Not Retained

    @Syvenn copy-pasting controls can cause formatting issues, especially once you add more complexity to them (e.g. responsive galleries). If you need the exact same code/controls or just overall architecture, it is better to create them as components in your application.

    This will not only make your app more maintainable, but will save you a lot of formatting and control renaming troubles.

    In my experience you can make components fully responsive. Properties such as Parent.Height & Parent.Width can be accessed. You are also able to use Component Input Variables (Custom Property), to adjust the width, height, Size... of your controls with data from your app screen (e.g. ScreenSize). (Output variables can be used to fetch data from the component to the app)

    Should you be interested in responsive component design, there are numerous YouTube tutorials on this

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard