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 / Not fetching data from...
Power Apps
Answered

Not fetching data from a Gallery

(0) ShareShare
ReportReport
Posted on by 24

Hello,

I am facing a issue with fetching data from a gallery to a form.

There is a gallery named gallery2

ArpanBala_0-1642508052730.png

Where I developed coloring alternating rows. In the item property of the gallery I wrote this formula. 

ArpanBala_1-1642508212545.png

And I have a form named form1

ArpanBala_2-1642508286758.png

When I pressed the edit button it will navigate to this form1 in edit mode.

But when I try to put the formula "Gallery2.Selected" in the item property of the form1 it is showing this error.

ArpanBala_3-1642508467062.png

Kindly help me out. 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ArpanBala 

    With the addition of the row number column in your Items property, you have changed the schema of the record for the form and it is no longer compatible with your datasource.

    There are a couple of ways to resolve this. 

    Usually it is to drop the column in your Items of the gallery, but you are using that to color your rows...

    So, you will need to drop it to the form.

    You could issue a LookUp in the select or in the Item property of your form, but I personally would rather not make another trip to the datasource since you already have the data.

    The trick though is this...the DropColumns function expects a table, and your record...well, it's a record.

     

    First(DropColumns(Table(Gallery2.Selected), "rowNumber"))

    This will convert your record to a table, then perform the table function - DropColumns - on that table to remove the column, then it will return the First (and only) record of that table.

     

    I hope this is helpful for you.

  • ArpanBala Profile Picture
    24 on at

    Thank you so very much.

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard