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 / Toggle not working as ...
Power Apps
Answered

Toggle not working as it has in previous apps

(0) ShareShare
ReportReport
Posted on by 244

I have used an approach with the Toggle and SharePoint Yes/No fields pretty regularly. Today I tried to rebuild a form using the exact same working function and keep getting errors that make no sense. 

 

The form includes a toggle (control renamed to OBO) to indicate whether you are submitting a request yourself or on behalf of another user.

 

If the toggle remains unchecked (false), the current user's display name is added to a people picker field next to it, the display mode is "Display", and the label above the field indicates "Requested by".

 

If the toggle is checked (true), the "Requested by" label becomes "Requested on behalf of ", the display mode is "Edit" and becomes required. 

 

Now, in the rebuild of the form, any action I try to take using the OBO toggle treats it as text instead of boolean. The form is using a duplicate of the original list, so all the fields are exactly the same. OBO is still a Yes/No field. Below are screenshots of the working and failing fields in their respective forms. 

Still Working

Working_OBO.png

 

Failing

Failing_OBO_01.pngFailing_OBO_02.png

 

This is the first row of the rebuild, so there is nothing else in the form that could be causing problems. I haven't even started adding code to the properties of the app, screen, form or other fields. This seems pretty simple and straightforward. No idea how it can be working in one form and not in another. 

Categories:
I have the same question (0)
  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Yah at some point it stopped working just referencing the name of the control. Where before it would automatically assume you wanted to know it's value, that is no longer the case. Really weird change, I know. Now you need instead of

    Toggle1

    you put

    Toggle1.Value
  • CCJones Profile Picture
    244 on at

    Thanks @TheRobRush . That resolved part of the problem. Seems to be more than one issue at hand here. So I changed the code in the label for the Requested By field to use "OBO.value" instead of just "OBO" and that cleared one of the errors. The first error is still there though. It says it wants a Text value for the label field. That's exactly what it's getting if it works through the formula in the Text property field: 

    If(OBO.value, Parent.Default, "Requested on behalf of ")

     

    Even if I just put "Parent.Default" in the text property of the label field, it errors! That's the default value applied to the card when you add it to the form! Again, this is one of those things that worked in the old form and now is behaving nonsensically in the new! 

  • CCJones Profile Picture
    244 on at

    Deleted the Requested By field and tried the formula again. This time it worked. Thanks for the aid!

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Yah, forms are a little awful haha. I almost always avoid them and just run the patches manually. Any small thing changes (like how a toggle reference works) and it will often break the form and need to either delete and re-add cards, or sometimes even delete and re-add the entire form.

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
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard