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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Question - Pass or Fail based on fields being chosen yes or no

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I have a form, this form is connected to a sharepoint list - i also have a column in my sharepoint list for "Pass" or "Fail" - at the moment this is populated as empty. 

 

I need to fill this with either pass or fail based on the outcome on the dropdown boxes within the form. 

 

i.e. 12/12 say "Yes" - it need to populate "Pass" 

10/12 say "Yes" and the remainder say "No" - It needs to populate "Fail"

 

Do any of you guys know the best way of doing this. I have tried doing a count of all that say yes and then  comparing that in order to populate but this does not work. I cant seem to get the variable to initialise within onstart. 

 

 

Any help would be much appreciated. 

 

Thank you! 

I have the same question (0)
  • AARON_C Profile Picture
    2,233 Most Valuable Professional on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    Hi @PowerNovice,

     

    Can you please show me your current form.

  • PowerNovice Profile Picture
    on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    Hi @AARON_C ,

     

    Please see below;

     

    PowerNovice_0-1699971306723.png

     

  • AARON_C Profile Picture
    2,233 Most Valuable Professional on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    @PowerNovice 

     

    Okay, so if any of the drops down say no, you want the outcome to be fail?

  • PowerNovice Profile Picture
    on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    Yes Correct

  • PowerNovice Profile Picture
    on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    Wait sorry @AARON_C i have one dropdown which needs to be no in order to pass as well "No obvious damage" = No not Yes

  • Verified answer
    AARON_C Profile Picture
    2,233 Most Valuable Professional on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    @PowerNovice 

     

    For your DefaultSelectedItems property of your column with the choice "Pass" or "Fail" in your form.

    If(
     // Logical condition
     DataCardValue1.Selected.Value = "No" ||
     DataCardValue2.Selected.Value = "No" ||
     DataCardValue3.Selected.Value = "No",
     // If true
     {value: "Fail},
     // Else
     {value: "Pass"}
    )
    
     

    This works in dataverse.

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • PowerNovice Profile Picture
    on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    Hi @AARON_C ,

     

    The column uses a text datacard - i cant seem to find that property DefaultSelectedItems, so i have put it in the default, but i am getting an error. 

    PowerNovice_0-1699976520846.png

     

     

  • AARON_C Profile Picture
    2,233 Most Valuable Professional on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    @PowerNovice 

     

    Try this on the Default property then and change the it to just "Fail" and "Pass"

  • PowerNovice Profile Picture
    on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    Hi @AARON_C ,

     

    That works thank you! 

     

    PowerNovice_0-1700048016424.png

     

  • Verified answer
    PowerNovice Profile Picture
    on at
    Re: Question - Pass or Fail based on fields being chosen yes or no

    PowerNovice_0-1701266466161.png

     

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

Coming soon: forum hierarchy changes

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

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard