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

Community site session details

Session Id :
Power Apps - Building 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
    152,811 Most Valuable Professional on at
    Re: The context variable types are incompatible with the types of value in other places in your app

    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
    Re: The context variable types are incompatible with the types of value in other places in your app

    @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
    152,811 Most Valuable Professional on at
    Re: The context variable types are incompatible with the types of value in other places in your app

    @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

Coming soon: forum hierarchy changes

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 803 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard