cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudosaurus
Post Prodigy
Post Prodigy

Logic Apps SharePoint Create Item BadRequest 400 String was not recognized as a valid Boolean

Hello!

 

In Logic Apps my workflow is getting responses from MS Forms and populating the information into a SharePoint list.

 

This was working all well and find in Power Automate however since moving to Logic Apps, it appears that my Create Item action is falling over with the message status of 400 with the message: String was not recognized as a valid Boolean.

 

 

{
  "status": 400,
  "message": "String was not recognized as a valid Boolean.\r\nclientRequestId: b7e7f139-64ba-4937-873f-543ffc58942e\r\nserviceRequestId: b7e7f139-64ba-4937-873f-543ffc58942e"
}

 

 

sudosaurus_2-1642089091676.pngsudosaurus_0-1642088953193.pngsudosaurus_1-1642088983101.png


I'm wondering if it has something to do with how the form questions/answers are being incorrectly formatted when added to the list? As when I take out this Q1 field, the item gets created successfully. So it creates the item ok with the other details just not with any questions or answers.

sudosaurus_3-1642089293130.png

 

Any ideas?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @sudosaurus ,

you have a . (dot) before the 'Yes', it should be a comma.

wrong:
if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'].'Yes'),true,if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'No'),false,null))

correct:
if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'Yes'),true,if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'No'),false,null))


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

4 REPLIES 4
tom_riha
Super User
Super User

Hello @sudosaurus ,

I'd try to convert it from Yes/No values to true/false values, e.g. with an if(...) expression.

if(
    equals(<value from Forms>,'Yes'),
    true,
    if(
        equals(<value from Forms>,'No'),
        false, 
        null
    )
)

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

HI @tom_riha 

 

Could you inspect the below? Not sure what I'm getting wrong on this one?

 

if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'].'Yes'),true,if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'No'),false,null))

Hello @sudosaurus ,

you have a . (dot) before the 'Yes', it should be a comma.

wrong:
if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'].'Yes'),true,if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'No'),false,null))

correct:
if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'Yes'),true,if(equals(body('Get_response_details')?['r627f4b6e623d4a72b97f27808180f880'],'No'),false,null))


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
sudosaurus
Post Prodigy
Post Prodigy

That's great thanks @tom_riha 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,162)