Skip to main content

Notifications

Community site session details

Community site session details

Session Id : DgH4mBK5MroXpLlBNWBJUg
Power Automate - Building Flows
Unanswered

A Boolean value in the On connector of a Switch in power automate

Like (0) ShareShare
ReportReport
Posted on 7 May 2021 20:50:37 by 160

I have a flow that has been working for a while where the switch On value is a Boolean called HirMgrComplete.  I had the values in the switch as Yes  and No respectively as the TrueText property is equal to Yes and the FalseText property is equal to No in the PowerApp.  It worked for several months but I am now getting this error:

 

yesNo.jfif

onboardingFlow.jfif

 

I have tried true and false as well as 1 and 0.  When I try true and false I get the following error:

 

"The template validation failed:  'The template action 'Switch' at line'1' and column '5463' is not valid:  the value 'True' specified for 'case' property in switch case 'Hir_Manager_Complete_Yes' is not allowed.  Only values of types string, number or a '@parameters()' expression that evaluates to a number or a string is allowed.'."

 

Any help would be very much appreciated.

  • GoGorilla Profile Picture
    160 on 10 May 2021 at 17:33:28
    Re: A Boolean value in the On connector of a Switch in power automate

    @abm I will give this a try but I am extremely curious as to why it has been working as is for months and months.

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 07 May 2021 at 22:23:19
    Re: A Boolean value in the On connector of a Switch in power automate

    Hi @GoGorilla 

     

    Workaround is convert the boolean value to 1 or 0 using an IF expression. Please see below.

     

    image.png

     

    Above my expression is as follows

     

    if(items('Apply_to_each')?['OpenpointsW'],1,0)
     
    My boolean field is called 'OpenpointsW'
     
    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,081 Most Valuable Professional

Leaderboard
Loading started