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 / Network Error when usi...
Power Apps
Unanswered

Network Error when using patch function- sharepoint

(0) ShareShare
ReportReport
Posted on by 53

Hello Team,

 

I am getting "Network error when using patch function,

The specified column is read only cannot be modified" when submitting records.

It was working fine before.

 

This is my code.

 

Green highlighted code is working ,red high lighted code is not working.

 

I t was working before.

 

 

 

//EditForm_Projectinfo.Unsaved
//ClearCollect(changes,{Change,oldvalue,newvalue});
//If(First(col_updateprojinfo).'Project Name'=DataCardValue65_1.Text


Patch('Project Information',LookUp('Project Information',ID=First(col_updateprojinfo).ID),{'Project Name':DataCardValue65_1.Text,'Business Unit':DataCardValue6.Text,'Approved By':DataCardValue4.Text,'Project Sponsor':DataCardValue5.Text,'Brief Scope':DataCardValue71_1.Text,'Assumptions & Constraints':DataCardValue73_1.Text,Entity:{
Id: LookUp(Entities,Entity= DataCardValue76_1.Selected.Value).ID,
Value:LookUp(Entities,Entity= DataCardValue76_1.Selected.Value).Entity
},

'Project Manager':{
Id: LookUp(
'Initiative Managers',
'Project Manager' = DataCardValue67_1.Selected.Value
).ID,
Value:LookUp(
'Initiative Managers',
'Project Manager' = DataCardValue67_1.Selected.Value).'Project Manager'
}
,
Importance:DataCardValue72_1.Selected,'Last Updated Role':var_group});


ForAll(col_changedfields,Patch('Change Log',Defaults('Change Log'),{Date:Today(), 'Field Changed':ThisRecord.Fieldname,'Change By':User().Email,'New Value':ThisRecord.Newvalue,'User Role':var_group,'Old Value':ThisRecord.oldvalue,'Project Name(Lookup value)':
{
Id: LookUp('Project Information',ID=First( col_updateprojinfo).ID).ID,
Value:LookUp('Project Information',ID=First( col_updateprojinfo).ID).'Project Name'
}

}));

ClearCollect(col_updateprojinfo,Filter('Project Information',ID=First(col_updateprojinfo).ID));
Refresh('Project Information');
Set(var_spinner,false);
Clear(col_changedfields);

Notify(Concatenate("Your project information has been succesfully saved" ,First(col_updateprojinfo).'Project Name'),NotificationType.Success);
//Navigate(Scrn_KPI_Edit_2);
ClearCollect(col_max_rec,
{date_val:First(col_updateprojinfo).Modified,person:First(col_updateprojinfo).'Modified By'},
{date_val:First(col_milestones).Modified,person:First(col_milestones).'Modified By'},
{date_val:First(col_status).Modified,person:First(col_status).'Modified By'},
{date_val:First(col_status).Modified,person:First(col_status).'Modified By'},
{date_val:First(col_RiskIssue).Modified,person:First(col_RiskIssue).'Modified By'},
{date_val:First(col_KPI).Modified,person:First(col_KPI).'Modified By'});

//Sort(,First(col_milestones).'Modified By',First(col_status).'Modified By',First(col_RiskIssue).'Modified By',First(col_KPI).'Modified By',);
Sort(col_max_rec,date_val,SortOrder.Descending);
Set(var_last_updatedby,First(Sort(col_max_rec,date_val,SortOrder.Descending)).person);
Set(var_last_updatedon,First(Sort(col_max_rec,date_val,SortOrder.Descending)).date_val);

 

 

 

 

@WarrenBelz @M_Ali_SZ365 @LaurensM 

Categories:
  • alexneedleman Profile Picture
    45 on at

    Hello,

     

    Are any of the columns you're trying to update Dropdown/Choice columns in your List by chance? I ask because this exact error was driving me nuts a couple of days ago, and I fixed it by changing the syntax. Apparently when you're patching Choice columns, you need to format it like so:

    Patch(
    'ListName',
    LookUp('ListName', ID = First(col_updateprojinfo).ID),
    { 'ColumnName': { Value: NewTextValue } }
    )

    Just replace ListName with the List you're trying to Patch, ColumnName with the name of the Choice column, and NewTextValue with whatever Text you're using for the function.

     

    Hope this works for you, Patch is a frustrating function I swear it breaks if you sneeze or the weather changes.

  • AiswaryaKrishnakumar Profile Picture
    53 on at

    Thank you for your reply. Let me try 

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

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard