• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

GRISCHKE SOLUTIONS

Website and Software Development | IT | Office

  • Home
  • About
  • Services
    • Web Development & Hosting
    • IT, Networking and Cloud Solutions
    • Email and Office Solutions
    • Design Services
    • Quality Management
    • Document Management
    • Performance Dashboard
    • HR Management
    • Payroll Solutions
    • IT Support
    • GDPR
  • Blog
    • Delete Deleted Users in Office 365 – Using Power Apps App
    • Start Jaguar Engine Remotely with Siri
    • Backup and restore IONOS DNS records using Power Automate, API, including SOA record
    • How to build an Email Parser in Microsoft Flow (Extract text from email body)
    • Windows 10 1803 new OEM (or ESP) Partition
    • Unprotect Excel Worksheets without Password
    • Data protection law is changing – you need to act now
    • Calculate Ratio Between Two Numbers
    • Charts in SharePoint
    • Microsoft SharePoint Services – What you need to know
    • Hide Featured Images in Genesis using 3 lines of code
    • Workflow loop through SharePoint list
  • Products
    • Basket
  • Enquiry

Convert Boolean values True or False to string values Yes or No in Microsoft Flow

6th January 2019 By Maciek Grischke Leave a Comment

For those who created Flows with Boolean values not wanting ugly True or False as the end result, there is an easy way to convert those to Yes or No.

All you have to do is to add an IF function in the following format.

When used with Variables, you can select Type as Boolean and then use external data for value or simply Type as a String and then enter True as text.

Add Variable > Initialize Variable action, Name set to TextValue, Type set to String, in Value enter true or True. If you want to use Boolean value, then Value field must contain a boolean value from another data source, i.e., SharePoint list field.

if(equals(variables('TextValue'),'true'),'yes','no')

But you probably don’t want to add 30 Initialize Variable and Compose actions like in my case. I wanted to simplify this. My data source is a SharePoint list and over thirty Yes/No columns, so instead of importing field values to the email form (that by default will return True or False), I used the following expression, similar to the above, but slightly modified so that it works directly with Boolean columns in SharePoint lists and converts Boolean values to Yes or No “on the go”.

if(equals(triggerBody()?['InternalColumnName'],True),'Yes','No')

The InternalColumnName is not the name of the column you name in most cases, here’s why. When you create columns in SharePoint lists, and when you use two-word name for it, with space, for some reason, SharePoint converts space (and other characters) into _x0020_. So if you called your column Column Name. SharePoint would convert it to Column_x0020_Name and this is what Internal Column Name is. To find the internal column name, go to list settings, hover your mouse over each column name, or click on the column name and watch the status/address bar. It will show you an URL similar to this:

https://yourname.sharepoint.com/_layouts/15/FldEdit.aspx?List=%7BB2108C19%2DD4A0%2D4042%2D85CC%2DC2A2C37AC50E%7D&Field=Column_x0020_Name

The string after the equal sign is your Internal Column Name.

Filed Under: Tutorials Tagged With: Boolean, Column Name, False, Microsoft Flow, No, sharepoint, True, Yes

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

  • Delete Deleted Users in Office 365 – Using Power Apps App
    By Maciek Grischke
    13th March 2023
  • Lock and Unlock your Jaguar with Siri
    By Maciek Grischke
    21st January 2023
  • Start Jaguar Engine Remotely with Siri
    By Maciek Grischke
    6th December 2022
  • Travel Mileage Claim Form in Power Apps using TomTom API
    By Maciek Grischke
    24th September 2022
  • Backup and restore IONOS DNS records using Power Automate, API, including SOA record
    By Maciek Grischke
    14th August 2022
  • Home
  • About
  • Services
  • Blog
  • Products
  • Enquiry

 

Designed in-house by GRISCHKE SOLUTIONS © 2022 · Log in

Address

GRISCHKE SOLUTIONS
8 Sycamore Cottages
High Street
Pembury
TN2 4PJ

Site Info

Privacy Statement

Cookies Policy