cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrpowergage
Resolver I
Resolver I

Patch Task Activity Status

I have a checkbox. Which OnChecked I want to patch the update to the Tasks table.

NB this is an activity task in the dataverse/dynamics.

The below doesn't work. It throws the error: "Invalid argument type. Expecting a
OptionSetValue value, but different schema."

Patch(Tasks,ThisItem,{'Status Reason':'Activity Status (Tasks)'.Completed})


These are the columns provided:

Untitled 2.jpg


I have also tried 'Activity Status (Activities)' with the same results.

 

Any ideas what is going on here?

1 ACCEPTED SOLUTION

Accepted Solutions
mrpowergage
Resolver I
Resolver I

I needed to update both the statecode and the statuscode at the same time

 

Patch(Tasks,ThisItem,{statuscode:'Status Reason (Tasks)'.Completed,statecode:'Activity Status (Tasks)'.Completed})

 

View solution in original post

1 REPLY 1
mrpowergage
Resolver I
Resolver I

I needed to update both the statecode and the statuscode at the same time

 

Patch(Tasks,ThisItem,{statuscode:'Status Reason (Tasks)'.Completed,statecode:'Activity Status (Tasks)'.Completed})

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,309)