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 / patch not able to copy...
Power Apps
Unanswered

patch not able to copy the datacard value to the sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hi expert

trying to patch the form to the sharepoint list where i wanted to copy value from one column to another colum

 

 

 

If(
 !IsBlank(varRec.ModifiedBy) && varRec.ActiveStatus.Value = "Active",
 UpdateIf(Forecast, EmployeeName = varRec.EmployeeName,
 {
 ApprovalStatus: "Approved",
 ActiveStatus: {Value: "Active"},
 Jan: Value(DataCardValue56.Text),//datacard value is the datacard of pending column
 Feb: Value(DataCardValue60.Text),
 March: Value(DataCardValue61.Text),
 April: Value(DataCardValue62.Text),
 May: Value(DataCardValue63.Text),
 June: Value(DataCardValue64.Text),
 July: Value(DataCardValue65.Text),
 Aug: Value(DataCardValue66.Text),
 Sep: Value(DataCardValue67.Text),
 Oct: Value(DataCardValue68.Text),
 Nov: Value(DataCardValue70.Text),
 Dec: Value(DataCardValue71.Text),
 
 }
 );
 Office365Outlook.SendEmailV2(
 varRec.ModifiedBy,
 "Approval for" & varRec.EmployeeName & "'shas been approved",
 "Bummer. the Recrd is compliant:<br>",
 {Cc: varUser.Email}
 ),
 varRec.ActiveStatus.Value = "Inactive",
 Patch(
 ResourceAdjustment,
 Defaults(ResourceAdjustment),
 {
 EmployeeID: varRec.'EmployeeID (EmployeeID0)',
 EmployeeName: varRec.EmployeeName,
 Role: varRec.Role,
 ResourceType: varRec.ResourceType,
 TerminationDate: varRec.TerminationDate,
 DailyHours: varRec.'Daily Hours',
 YearlyForecast: Value(varRec.YearlyForecast),
 ActiveStatus: {Value: "Inactive"}
 }
 );
 Remove(
 Forecast,
 varRec
 ),
 Set(
 varRec,
 Patch(
 Forecast,
 varRec,
 {
 ApprovalStatus: "Approved",
 ActiveStatus: {Value: "Active"}
 }
 )
 );
 Office365Outlook.SendEmailV2(
 varRec.CreatedBy,
 "Approval for" & varRec.EmployeeName & "'shas been approved",
 "Bummer. the Recrd is compliant:<br>",
 {Cc: varUser.Email}
 );
 Clear(colSelected);
 ClearCollect(
 colData,
 Forecast
 );
 ResetForm(Form1)
);
Navigate(Welcome)

 

 

 

 

pokhani_0-1660913511352.pngpokhani_1-1660913525928.png

the main purpose of this was to simply copy the value from pending to actuals

pokhani_2-1660913663195.png

pokhani_1-1660913961926.png

 

 

please advise

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I didn't find any errors...

    Maybe you could try to set a variable to save the value of datacard56 before doing any patch/update.

     

    Best Regards,

    Wearsky

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,070

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 608

Last 30 days Overall leaderboard