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 / Gallery Selection not ...
Power Apps
Answered

Gallery Selection not working

(0) ShareShare
ReportReport
Posted on by 1,059

Hi,

I have an application which has SQL as a DataSource and it records Daily User tasks,

Somehow, there is an error in the application

When I select a Record from the gallery, it's just not displaying in the Detail form and it showing an error:
TaskManagement.png

When I hover on TrackGal.Selected  the Selected is underlined in Red and it says,

"Invalid Formula, Expected a value compatible with DataSource.."

it was working before but now it's creating problem in the whole application, I can't edit or view any record...

Help @RandyHayes  @eka24 

Categories:
  • Craig_Cowley Profile Picture
    311 on at

    I'm new to PowerApps and I'm see the same issue, although my gallery is underlined in green

    GalleryIssue.png
  • MH3 Profile Picture
    1,059 on at

    Hi @Craig_Cowley 

    My Gallery name is also in green but the Selected is in red, and I cant view any record..

    I'm experiencing this issue now. what about you?

    But I have the same application in tablet view. with same DataSource, it's working fine there. what's the problem?

  • Craig_Cowley Profile Picture
    311 on at

    @MH3 I've found another video where I've set my OnSelect to "Set(VarRecord, ThisItem) and then I've set Item of my form to VarRecord.

    This seems to now work

  • Verified answer
    MH3 Profile Picture
    1,059 on at

    Hi @Craig_Cowley 


    I had used this but when in the Detail form, 
    Items Property (VarRecord) it was not working.

    So, I have used this 
    Gallery  Item >> OnSelect  

    Set(SelectedItemID, ThisItem.TransId);Navigate(DetailScreen)

    Where Transid is my Unique identifier in SQL DB.

    Then in Detail Form >> Item Property

    LookUp('[dbo].[TimeSheet]',TransId=SelectedItemID)

      
    This seems to be working for me now.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard