web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to pass toggle val...
Power Automate
Unanswered

How to pass toggle value and convert it

(0) ShareShare
ReportReport
Posted on by

 

I have built a Powerapp which needs to pass the value from  a toggle control to a flow

 

AlessandroP_0-1643311556801.png

 

AlessandroP_1-1643311615119.png

 

the variable gets initiated with the value true which is fine 

AlessandroP_2-1643311648523.png

 

However , I need to convert the string value into Yes or No.

 

I created another variable that does the follow

 


if(equals(outputs('ForceEnd'),'false'),'No','Yes')

 

but I get the following

 

 


Unable to process template language expressions in action 'Initialize_variable_2' inputs at line '0' and column '0':
'The template language function 'if' expects three parameter:
the condition to test as the first parameter,
the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter.
The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.

 

 

Can you please help?

 

 

 

 

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @Anonymous ,

    I guess is more simpler to directly pass the string value from PowerApps to flow.

    Here is a simple example:

    gabibalaban_0-1643383232979.png

    The Button will have the following OnSelect property: 

    ToggleFlow.Run(
     If(Toggle1.Value,Toggle1.TrueText,Toggle1.FalseText)
     )

    And on the flow side: 

    gabibalaban_1-1643383420462.png

    I recomand to use PowerApps (V2) as trigger because it is much easier to control the parameters.

     

    Hope it helps !

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard