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 / The context variable t...
Power Apps
Unanswered

The context variable types are incompatible with the types of value in other places in your app

(0) ShareShare
ReportReport
Posted on by 174

Since a few months I ALWAYS encounter this error when I just change the Filter or Sorting in my Gallery Items.

Most of the apps have a gallery with Items SharePointList, and something like this
Set(selRecord, ThisItem); Navigate(screen2) on OnSelect.
Screen2 will simply displays the record selRecord in more detail.  eg: selRecord.Title

When I now want to add a filter or Sort the Datasource by changing the Item property to
Filter(SharePointList, Status.Value = "Active"), any change to the Item property (adding a new Filter conditions, changing Sorting, ...  ) results in that error. Always. It's driving me nuts. Just reloading the app in the studio makes the error go away, but it's very annoying.
The context variable types are incompatible with the types of value in other places in your app. 


Does anyone else have this problem? Any solutions? 

Thanks
Bart




 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at

    Hi @BClouded ,

    Seems a bit strange, but it you put selRecord in a Search and see every place it is being used, you might find where it is being set as some other structure.

  • BClouded Profile Picture
    174 on at

    @WarrenBelz 

    Thanks for your reply. Unfortunately that is not case. It's not being set anywhere else. 
    Unless in some Patch functions, I often use the set function directly in combination of a Patch. So the variable is being overwritten with the new values. 
    Set(selRecord, Patch(SharePointList, selRecord, {Title: "XXX"})) 

    So I am the only one who encounters this issue, I thought it must be a bug in the latest studio version or so?
    I have this on multiple computers, in multiple tenants. 

    You can not reproduce this? 



  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at

    @BClouded ,

    I believe your issue is here

    Set(selRecord, Patch(SharePointList, selRecord, {Title: "XXX"})) 

    and here

    Set(selRecord, ThisItem); 

    the first contains only one field Title and the second the entire record (so the structures are different)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard