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 Apps
Answered

undefined

(0) ShareShare
ReportReport
Posted on by 150

I am using Patch function inside the gallery but it is giving invalid arguments error.

Patch(Employee,ThisItem.index,ThisItem.index-1)

Employee is table name.

 

 

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @Moira0509 ,

     

    Hope you are doing well.

     

    I believe you need to check the syntax of patch function. 

     

    Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])

     

    Above is the syntax.

     

    I assume that you want to update column name "index" in data source, if yes, then please try below formula:

     

     

    Patch(Employee,ThisItem,{index: thisitem.index-1})

     

     

     Otherwise, request you to elaborate the error and requirement.

     

    I hope this helps.

    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.

    Thanks,

    ANB

     

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Moira0509 ,

     

    Please try:

    Patch(Employee,ThisItem,{index:ThisItem.index-1})

     

    Best Regards,

    Bof

  • Moira0509 Profile Picture
    150 on at

    Now there is not any any error is coming but it is not updating the table.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard