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 / Getting "'ThisItem' is...
Power Apps
Answered

Getting "'ThisItem' isn't recognized" in a formula

(0) ShareShare
ReportReport
Posted on by 36

I have an Edit Form, for which I am trying to update a column (MyColumn) with a value upon submitting the said Form. I have the following formula in OnSelect. Meanwhile, I obtain an error stating 'ThisItem' isn't recognized. Why is this? How can I reference the current record?

 

SubmitForm(MyFormEdit); Patch(MyTable,ThisItem,{MyColumn:"MyValue"}); Navigate(ScrMain);

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    Hi @JF000001 ,

    It depends where your button is situated (if not inside the Form, ThisItem has no relevance). You are however better putting the Patch on the OnSuccess of the Form after submission.

    Patch(
     MyTable,
     {ID: Self.LastSubmit.ID},
     {MyColumn:"MyValue"}
    ); 
    Navigate(ScrMain);

     

    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

     

  • JF000001 Profile Picture
    36 on at

    Thank you very much @WarrenBelz This is working, and solves part of my issue. I had another related question if I may. I am trying to update the field above, not with a hard-coded value as specified initially, but with the value of another column from the same table, which is a LookUp column, consisting of a relationship to another table. How can I get the value of that Lookup? Thank you again.

  • WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    Hi @JF000001 ,

    Just replace "MyValue" with 

    Self.LastSubmit.LookupColumnName.Value

     

    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

     

  • JF000001 Profile Picture
    36 on at

    Thank you @WarrenBelz  I had actually tried this, but I am receiving the following two errors with this formula. This column consists of a lookup/relationship to another table. (Just to specify, 'MyColumn', is of type Text).

     

    The type of this argument 'MyColumn' does not match the expected type Text. Found type Error.
    Name isn't valid. 'Value' isn't recognized.

  • WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    @JF000001 ,

    What is your data source here ?

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard