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 value in if tru...
Power Apps
Unanswered

Toggle value in if true statement

(0) ShareShare
ReportReport
Posted on by 4

I have the following IF statement:

If(CalEqipView, TogCalDue.Value, If(UploadView, TempUpper, TxtUpper.Text))

Where CalEqipView is false, UploadView is false, TempUpper is a string and TogCalDue is a toggle component.

My understand is that it should evaluate as the string in TxtUpper.Text but i'm getting the result 'false'.

It turns out powerapps is evaluating the CalEqipView's true statement as another IF, as when I use the following:

If(CalEqipView, If(TogCalDue.Value, "true", "false"), If(UploadView, TempUpper, TxtUpper.Text))

 I get the desired result. 

Is it me or is there a bug in powerapps?

 

I'm using Authoring version: 3.24051.23

Categories:
I have the same question (0)
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    try with isBlank(variableName or datacardname) function where you want to evaluate the variable is empty or not

  • jmoore3 Profile Picture
    4 on at

    none of the variables or components are empty as they are set on screen startup (onvisible)

  • elseb Profile Picture
    774 Moderator on at

    Hi,

    Yeah it does seem to brake when you do that, If you want this code to work and display 

    TogCalDue.Value

    in text when the CalEqipView is true,  just wrap that toggle in Text(TogCalDue.Value) and it will work fine 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard