cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
white_knight
Frequent Visitor

Powerautomate Send http request SharePoint - Not updating Yes/No field

Hi everyone.

 

I am trying to use the Send HTTP request to SharePoint to update a Yes/No field as well as resetting three text fields to blank.

 

My flow is working and is indeed resetting the text fields but I suspect I need some further syntax for Yes/No. Below are the details I have so far:

 

Method is POST and URI is _api/web/lists/GetByTitle('Employeeonboarding')/items(@{items('Apply_to_each')?['ID']})/validateUpdateListItem

 

and my body uses "formValues" and I use two variables, EmptyString = '' and YesNo which is set to false, below is the detail any help much apricated.

 

{
"formValues":[
{
"FieldName":"ColleaguesAddress",
"FieldValue":@{variables('EmptyString')}
},
{
"FieldName":"PersonalMobile",
"FieldValue":@{variables('EmptyString')}
},
{
"FieldName":"PersonalEmail",
"FieldValue":@{variables('EmptyString')}
},
{
"FieldName":"HousekeepingComplete",
"FieldValue":"@{variables('YesNo')}"
}
]
}

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @white_knight ,

 

I've made a test but did not encountered the problem you mentioned:

1\My SP List:

vbofengmsft_0-1653017425664.jpeg

2\My Flow:

vbofengmsft_1-1653017479823.jpeg

vbofengmsft_2-1653017487177.jpeg

URL

_api/web/lists/getbytitle('Bof0520')/items(@{items('Apply_to_each')?['ID']})

Body

{
"__metadata":{
"type":"SP.Data.Bof0520ListItem"
},
"Column1":"@{variables('EmptyString')}",
"HousekeepingComplete":"@{variables('YesNo')}"
}

Result:

vbofengmsft_3-1653017563166.jpeg

Best Regards,

Bof

 

 

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @white_knight ,

 

I've made a test but did not encountered the problem you mentioned:

1\My SP List:

vbofengmsft_0-1653017425664.jpeg

2\My Flow:

vbofengmsft_1-1653017479823.jpeg

vbofengmsft_2-1653017487177.jpeg

URL

_api/web/lists/getbytitle('Bof0520')/items(@{items('Apply_to_each')?['ID']})

Body

{
"__metadata":{
"type":"SP.Data.Bof0520ListItem"
},
"Column1":"@{variables('EmptyString')}",
"HousekeepingComplete":"@{variables('YesNo')}"
}

Result:

vbofengmsft_3-1653017563166.jpeg

Best Regards,

Bof

 

 

Hey thanks for responding to my post.

 

Following my post I did continue and try and resolve this. I think half of my problem was trying to use the URI and Body had found whilst searching for an answer.

 

It appears using the URl and Body you have detailed is far simpler .

 

My URI below:

_api/web/lists/GetByTitle('Employeeonboarding')/items(@{items('Apply_to_each')?['ID']}) 

 

Body as follows:

{
'__metadata': {
'type': 'SP.Data.Employee_x0020_onboardingListItem'
},
'HousekeepingComplete': true,
'ColleaguesAddress':@{variables('EmptyString')},
'PersonalMobile':@{variables('EmptyString')},
'PersonalEmail':@{variables('EmptyString')}
}

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.

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
Top Kudoed Authors
Users online (2,125)