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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Possible to convert to...
Power Apps
Answered

Possible to convert toggle boolean values into string?

(1) ShareShare
ReportReport
Posted on by 254

Hello,

is there a way to convert the output of a toggle from Values into Text?

Its a column with only two options, like Yes and No.

Since I need a delegatable column I chosed a plain text column. That column I want to check as a composite key for duplicates. A toggle is seemingly always If ( IsBlank(Lookup(Table; YESNOColumn= Toggle.Value. , but for look up to work I need it to be like 

Toggle.Text. 

 

The alternative would be a dropdown menu instead of toogle, which is definitely a Text type. But I find a toggle for two choices has much more usability than a drop down menu with two choices. 

 

Thank you very much in advance. 

Best. 

Categories:
I have the same question (0)
  • PowerPuffKK Profile Picture
    316 on at

    Hi @Applicable88,

     

    I do this for a lot of my apps built on SharePoint to avoid delegation - here's the formula that'll convert your toggle value to text: 

    Text(Toggle1.Value)

     

    Please see screenshot below - you can see that it was converted to text.

    PowerPuffKK_0-1654277674759.png

     

     

    If this answer helps you, please mark it as a solution to help future forum visitors 😊

     

    Kristine

  • Applicable88 Profile Picture
    254 on at

    Hi @PowerPuffKK I tried that on my submit button:

    If(IsBlank(LookUp(Quality; QualityID = DataCardValue1.Text && Delivered = Text(Toggle1.Value) ));

    SubmitForm(Form1);; NewForm(Form1);

    Notify("That combination is already in the list"; Error); SetFocus(DataCardValue1))

     

    But it doesn't work.

     

    What I want to achieve:

    PostID YESNO
    1234 Yes
    1234 NO
    1111 YES
    1111 NO

     

    Duplicates are allowed, but the same number can only be with yes or no one time each. (composite key)

     

    The duplicate check simply doesn't work, its lets every number past through. I think the problem is the toggle which output are false and true and not "No" and "Yes". So it doesn't find those words in the table, hence I can submit duplicates.

     

    Any idea how to solve that?

     

     

     

  • Verified answer
    PowerPuffKK Profile Picture
    316 on at

    Hi @Applicable88 ,

     

    Sorry, I didn't realise you had a Yes No column! 

     

    For your scenario, you can try something like this - if the Toggle is set to true, then the filter should search for 'Yes', if it's set to false - it should search for 'No'. The formula would look like this:

     

    If(Toggle1.Value = true, "Yes, "No")

     

    So your whole formula would look like this - just make sure the name of the toggle matches the toggle name in the formula.

     

    If(IsBlank(LookUp(Quality; QualityID = DataCardValue1.Text && Delivered = If(Toggle1.Value = true, "Yes", "No") ));
    
    SubmitForm(Form1);; NewForm(Form1);

     

     Please let me know if this works 😊

  • Applicable88 Profile Picture
    254 on at

    @PowerPuffKK wow....never thought that you can put one more If-statement after the "Delivered=..." to convert back to strings!

    Thank you so much:) Finally a solution to keep the slider after so many approaches. 

    I wish you a nice weekend!

    Best. 

  • PowerPuffKK Profile Picture
    316 on at

    @Applicable88 , you're very welcome!! We learn something new every day 😊

     

    Thank you and have a fantastic weekend too!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard