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 / Issue with ThisItem an...
Power Apps
Answered

Issue with ThisItem and Variable Reset

(0) ShareShare
ReportReport
Posted on by 12

Good morning guys, I had i issue with the ThisItem function, after I received this message from PowerApps. The app was working until I got this reset message. After that, the ThisItem function it's not recognized anymore, I was using inside those 2 variables

for Example: Set(Var,ThisItem.Value) and the Variables are inside a Gallery

 

So I have a few questions, Why I got this message? How can I fix the issue?

MicrosoftTeams-image (2).png
Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Pedro_Henrique -

     

    The error is appearing because you’re populating the variable with a record which contains a specific schema, but then somewhere else in your app, you’re also populating that variable with a record which has a different schema.


    Some classic checks

    • If you’re using an Edit Form control, it is important to understand that an Edit Form contains two important properties, the DataSource property and the Item property (which is used to display a specific record).

      The schema used in the DataSource property, and the schema returned in the Item property must match. For example, suppose you’re populating the Item property with a Gallery selection (or a variable created from a Gallery selection), if the data source used in the Gallery Items property is different than the data source used in the DataSource property in the Edit Form control, you will receive an error.

      This occurs very often when users leverage the AddColumns or GroupBy function when modifying the Items property of a Gallery control. If you have modified the schema of the Gallery like this, then the data source used in the Gallery Items property, and the data source used in the DataSource property of the Edit Form, will no longer match.

      To accommodate for this, it is best to use a LookUp function in the Item property of the Edit Form. For example:

     

    Lookup(yourdatasource, ID = Gallery1.Selected.ID)

     

     

    Or if using a Variable:

     

     

    Lookup(yourdatasource, ID = MyVariable.ID)

     


    If your scenario matches the above description, it is important to restart the app after you make this correction in order for the error to disappear.

     

    • Ensure you do not have a Global Variable and a Collection with the same name.

    • Follow a process of elimination to identify which variable declaration is causing the error. For example, navigate to the variables menu to view how and where the variable is being defined, and then for each declaration of that variable:

      1. Delete one instance where the “Set(Var,ThisItem.Value)” is being declared.
      2. Click save and restart the app and check if the error still appears.
      3. If the error continues to appear, repeat for the next declaration and keep restarting the app.
      4. Once the error disappears, you can then pinpoint exactly which declaration was causing the error, and then investigate further.
  • Pedro_Henrique Profile Picture
    12 on at

    Thanks a lot, the problem was a screen that I use to pass main screen(a copy of that) to it, and with that I got the same variable on it too.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard