cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
John-Shortland
Level: Powered On

SharePoint Yes/No fields not updating from MS Flow

I have a simple Flow to create an item when a new email arrives:

  • When a new email arrives
  • Parse JSON
  • Create item

The flow does work however, none of the Yes/No fields are not updating to Yes when the incoming value is true; the default value is No so false values are working as expected.

When a new email arrives

{ ... "Driver": true, ... }

Parse JSON

{
...
"Driver": true,
...
}

Create item
INPUTS

...
Driver
true
...

OUTPUTS

...
Driver
true
...

List Item in SharePoint

Driver (Yes/No) is un-checked/false

I have read the solution to Flow fails on Yes/No column (Big Flow) but to no avail.

https://powerusers.microsoft.com/t5/Using-Flows/Flow-fails-on-Yes-No-column-Big-Flow/m-p/35116#M1086

To confirm, I have unsuccessfully tried to add the following dynamic content options:

// In-correctly assumed the below line should work since a Yes/No field is a simple Boolean field;
// returns true but doesn't check the Driver checkbox in Item
body('Parse_JSON')?['json']?['Driver']

// Solution to Flow fails on Yes/No column (Big Flow);
// https://powerusers.microsoft.com/t5/Using-Flows/Flow-fails-on-Yes-No-column-Big-Flow/m-p/35116#M1086
// returns true but doesn't check the Driver checkbox in Item
equals(body('Parse_JSON')?['json']?['Driver'], true)

// All returns true but doesn't check the Driver checkbox in Item
if(body('Parse_JSON')?['json']?['Driver'], true, false)
if(body('Parse_JSON')?['json']?['Driver'], 'True', 'False')
if(equals(body('Parse_JSON')?['json']?['Driver'], true), true, false)
if(equals(body('Parse_JSON')?['json']?['Driver'], true), 'True', 'False')

// Throws error; and Flow fails as expected
if(body('Parse_JSON')?['json']?['Driver'], 'Yes', 'No')
if(equals(body('Parse_JSON')?['json']?['Driver'], true), 'Yes', 'No')

Now, I am just guessing so what am I missing?!

To summarise, my question is how do I successfully update Yes/No fields when creating an item?

Thanks in advance, any help would be greatly appreciated. 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
John-Shortland
Level: Powered On

Re: SharePoint Yes/No fields not updating from MS Flow

I stumbled onto a work-around, and accepted solution, where using the Send an HTTP request to SharePoint action to update the Description (Display Text) & URL fields of a Hyperlink field.

I found this post most helpful: Updating a Hyperlink field (both url and description) using Flow?

I used the same approach to update all Yes/No fields to Yes when the incoming value is true. Here are the key settings others may find useful.

Site Address: https://MyFakeSite.sharepoint.com/
Method: POST
Url: _api/web/lists/GetByTitle('MyFakeList')/Items(@{body('Create_item')?['ID']})
Headers: {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-HTTP-Method": "MERGE",
"IF-MATCH": "*"
}
Body: {
'__metadata': {
'type': 'SP.Data.MyFakeListItem'
},
'Driver': @{toLower(string(equals(body('Parse_JSON')?['json']?['Driver'], true)))},
...
}

 

View solution in original post

1 REPLY 1
John-Shortland
Level: Powered On

Re: SharePoint Yes/No fields not updating from MS Flow

I stumbled onto a work-around, and accepted solution, where using the Send an HTTP request to SharePoint action to update the Description (Display Text) & URL fields of a Hyperlink field.

I found this post most helpful: Updating a Hyperlink field (both url and description) using Flow?

I used the same approach to update all Yes/No fields to Yes when the incoming value is true. Here are the key settings others may find useful.

Site Address: https://MyFakeSite.sharepoint.com/
Method: POST
Url: _api/web/lists/GetByTitle('MyFakeList')/Items(@{body('Create_item')?['ID']})
Headers: {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-HTTP-Method": "MERGE",
"IF-MATCH": "*"
}
Body: {
'__metadata': {
'type': 'SP.Data.MyFakeListItem'
},
'Driver': @{toLower(string(equals(body('Parse_JSON')?['json']?['Driver'], true)))},
...
}

 

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,508)