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 / Urgent help needed: pr...
Power Apps
Answered

Urgent help needed: production app stopped working with patch statement, please help

(0) ShareShare
ReportReport
Posted on by 1,119

Hi there, for a service desk application i am trying to patch the record that is selected from the gallery.

 

I have gal_alltickets which has the similar screen below. On Select of > button, i have the code :

Set(varGalRecord, ThisItem)

 

venka91_0-1679555464219.png

 

 

This will navigate the screen and shows all the ticket details.

 

venka91_1-1679555553731.png

 

 

The support agent then have an option to change issue status, Priority or due date and enters the comment and then click on Submit.

 

In Submit button i have the formula :

 

Set(
 varGalRecord,
 Patch(
 MyHelpDesk,
 varGalRecord,
 {Comments: varGalRecord.Comments & "****" & "-" & User().Email & "-" & Now() & ":<br>" & html_comments.HtmlText},
 {lastcomment: PlainText(html_comments.HtmlText)},
 
 Form_agent.Updates,form_addattachments.Updates
 )
)

 

this code was working till yesterday and all of sudden today when i open this code in edit mode it throws me an error.

 

1. In my all_tickets gallery, On select of Button it shows as 

venka91_2-1679555807058.png

 

Is there a better way to patch my datasource with the gallery selected Item in the above formula way. Please help.

 

 

Categories:
  • Samuel-Zhou Profile Picture
    393 on at

    Hi @venka91 ,

    It may be that you have the same variable name, but different types of data stored inside, causing data conflicts. You can solve the problem by changing the variable names. However, why did you set the variable again when submitting?

  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Search for where you are using context variables by looking for UpdateContext(

    - it's saying that's the issue, and if you click the error dropdown on that item it will take you to the property that is having the error

  • venka91 Profile Picture
    1,119 on at

    This error taking me to an attachment control.

    I have just added form and showing only attachments, because i would like to show the attachments if any included when the user creating the ticket.

     

    In Datasource - My List name

    In Items - varGalRecord which is my variable i set on the gal_alltickets gallery select > button.

     

    venka91_0-1679558881153.png

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard