Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Problem - My condition always returns "Passed" regardless if it should be "failed"

Posted on by

Hi, 

 

I have a form that contains "Choice" dropdowns with the options "Yes" or "No". At the end of the form i have a text field that should show "Passed" or "Failed" based on whether the checks have returned the correct "choice" to determine if the check has passed or not. However, regardless if it should say "Failed" it always returns "Passed" because the statement is passing with a true value when it should be a false value. Below is the code to determine if its passed or not. Any help would be greatly appreciated. 

 

PowerNovice_0-1700567069283.png

I have also tried the following with nested If statements. 

 

PowerNovice_0-1700567212626.png

 

 

  • PowerNovice Profile Picture
    PowerNovice on at
    Re: Problem - My condition always returns "Passed" regardless if it should be "failed"

    Hi, yeh it fails on the first statement, not sure as to why it doesnt work

  • Akash1ve Profile Picture
    Akash1ve 108 on at
    Re: Problem - My condition always returns "Passed" regardless if it should be "failed"

    i would suggest you test with one signle condition at a time and then put second and test like wise test all the conditions

  • PowerNovice Profile Picture
    PowerNovice on at
    Re: Problem - My condition always returns "Passed" regardless if it should be "failed"

    When i've done that on both ways it hasnt worked 😞

     

    Attempt 1 - Now it says "Failed" when it should be "Passed"

    Attempt 2 - It shows blank when it should show "Passed"

     

    It appears this defaults the condition to false, whereas the way it was before defaults to true regardless of statements.

  • Akash1ve Profile Picture
    Akash1ve 108 on at
    Re: Problem - My condition always returns "Passed" regardless if it should be "failed"

    try to convert left side with text:

    Text(DataCardValue38.Selected.Value)="Yes"

    Like this

  • PowerNovice Profile Picture
    PowerNovice on at
    Re: Problem - My condition always returns "Passed" regardless if it should be "failed"

    Update - with the nested IF, when the confition is false, nothing is visible within the "PassFail" text datacard - however when true "Passed" appears. What could be causing this not to show when it fails? 

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard