Mapping Radio Button Data from Microsoft Forms to SharePoint Online Yes/No Columns using Microsoft Flow


I recently ran into an issue where I have a Microsoft Form that contains radio buttons and I want to send that information to a SharePoint list where I am using a Yes/No column.

image
Microsoft Form

image
SharePoint Column

The scenario seems pretty straight forward by mapping your Microsoft Form attributes to your SharePoint action. That is until you run into the situation where there is no dynamic content available for you when trying to map Yes/No fields in SharePoint. The reason for this is that Microsoft Flow is trying to avoid type conversion errors and will only show dynamic content where there are compatible data types. In this case, trying to pass a string to a boolean field is a risky endeavor since we might experience mismatches.

image
I am sure there are multiple ways to deal with this situation, but one way that I figured out was to use the equals() expression  More specifically: equals(body(‘Get_response_details’)?[‘re3d4781fc4b14229818cf02148ddb3b7′],’Yes’)

When we break this expression down, we will check to see if our form’s field equals ‘Yes’ which is the value that Microsoft Forms will send when a radio button is checked. This expression will return a boolean value of true or false. In the event we check ‘No’ in our form, our expression will result in a false value being outputted which is what we would expect. Knowing this, we can then safely map the output of this expression to a SharePoint Yes/No field.

imageWe can now safely send our Radio button data from Microsoft Forms to SharePoint.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s