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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery.Selected not w...
Power Apps
Unanswered

Gallery.Selected not working when editing an item

(1) ShareShare
ReportReport
Posted on by

Hi,
I'm having an issue with Gallery1.Selected when editing an item. It tells me Invalid formula. It was expected a compatible value with DataSource. I've already checked and the DataSource of the Gallery and the Form are the same. Anyone know how to solve this?

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I've placed the formula Lookup('DataSource', ID=Gallery1.Selected.ID) in the item property of the form and it worked fine.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    This is most likely due to your formula on the Items property of the Gallery.  If you are shaping the data in any way (AddColumns, ShowColumns, DropColumns, GroupBy, etc.) then the schema of the record of the Gallery will not match the datasource any longer and you will get the error you saw.

    The approach you took is the way to resolve that...just look up the actual record.

    If the shaping of the data in the Gallery Items was relatively "slight" (i.e. only added a column), then you can also drop the added column in the Item property of the Form - it's a few more steps to be able to do that.  I call this option B.  So your choice of what is option A works just as well.

  • talal Profile Picture
    2 on at

    I keep getting "Lookup is an unknown or Unsupported Function" when I add it into Item Property of Editform. Its driving me nuts since last 4 hours.. any idea what am I doing wrong? it does have the same source (SharePoint List)

  • Ryan_Fitz Profile Picture
    7 on at

    Thank you, this has resolved my own issue. As mentioned below, imagine this is due to my original gallery having multiple filters perhaps.

  • zerocool55 Profile Picture
    94 on at

    @tada1 

    use the correct syntax: LookUp(YourDataSource, ID=Gallery.Selected.ID)

  • AbidKhan1 Profile Picture
    2 on at

    Here is the mistake i was making.

    I was using a different data source for edit forms and different data sources for Gallery that is why it kept giving me an error message when i tried to set an item. As soon as i selected the same data set the error went away.

    Hope this Helps!!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard