Showing results for 
Search instead for 
Did you mean: 
Resolver I
Resolver I

Patch toggle value to Dataverse for Teams

Hi dear friends. Could you please help me find my mistake so that I can learn how to use a toggle in the galleri and patch it to Dataverse for Teams.


I've tested this with @RezaDorranis excellent sample solution to import in Dataverse for Teams: 


  1. I just added a Yes/No column called Klart (ready in swedish) in the table  (see image)
  2. ... and then a toggle in gallery - ThisItem.Klart
  3. Update the btnClick 
  4. ... and got the value as I expected in the collection. (see image)
  5. But then I got an error in the patch function. Table instead of a record value. (see image)



My project is to move existing apps for teacher where they mark different goal that the students have achived. These works fine in SP but I have some things to learn in Dataverse for Teams.

Super User
Super User


 The problem is, in your collection, the value for Klart column is true/false (as returned by the toggle). But dataverse needs a value, 'Klart (Work Progess Trackings)'.Yes or 'Klart (Work Progess Trackings)'.No


So, when you collect the values into your collection, you have to do this (instead of, just Toggle1.Checked)

If(Toggle1.Checked, 'Klart (Work Progess Trackings)'.Yes or 'Klart (Work Progess Trackings)'.No)


Note: You may have to replace Yes/No with Ja/Nej (because of Swedish). Please check.

Super User
Super User

@OlaH Just checking if you tried my solution and if you were able to get it working.

Thank you @CNT 

Excuse me but I don't really understand. So a toggle or checkbox in Dataverse doesn't work as a boolean in a SharePoint list. 


So the value, "True", as in my collection (see picture), is not enough?

Do I really have to write an If-statement to get Yes/No instead of true/false?

I've tried you suggestion but can't get it to work.




@OlaH What is the Error you are getting in the Patch?

Here's the message, @CNT . And as you can see in the picture above, colTaskUpdate.png, "Klart ..." is a value (True/False).

Patch message.png

@OlaH The second parameter in Patch has to be either a BaseRecord  - The record to modify or create or BaseRecordTable - A table of records to modify or create.

Then you need a third Parameter with either a Record with field(s) that have to be changed or a Table with Records that have to be changed.

Please refer to the syntax here,

Helpful resources

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.

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.


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.

Users online (4,294)