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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditioning textbox i...
Power Apps
Unanswered

Conditioning textbox input for Fail/Pass

(0) ShareShare
ReportReport
Posted on by 302

In the diagram below, Recipe (1) (DataCardValue3_1) Item properties is as below:

Table(
 {Value: "Omo Auto Wash(Add)", Lower: 590, Upper: 670},
 {Value: "Omo Avenger", Lower: 500, Upper: 600},
 {Value: "Omo Sunshine", Lower: 500, Upper: 600},
 {Value: "Radiant", Lower: 350, Upper: 450},
 {Value: "Sunlight Lite", Lower: 500, Upper: 600}
)

The DefaultSelectedItems property of Status (3) combobox is:

With({_val: IfError(Value(DataCardValue4_1.Text), 0)},

 {Value:
 If(_val < DataCardValue3_1.Selected.Lower || _val > DataCardValue3_1.Selected.Upper, "Fail", "Pass")
 }
)

I want that, when I enter values lesser or greater in the BD input combobox, it should change to Fail and when I enter values between the ranges selected in the Recipe, the Status value should change to Pass.

Can anyone help out in this case with the BD conditioning parameters?

Virikefe22_0-1661509636746.png

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Virikefe22 

    We already did this in your other post.

     

    What is the issue you are having now with it?  The formula should be providing what you need.

  • Virikefe22 Profile Picture
    302 on at

    No it's not @RandyHayes 

    When I select anything in the Recipe, the values in the Status changes immediately without entering a value into the BD field.

    The case scenario is, when I select anything from the list of the Recipe, and enter a value in the BD field, the Status should change to Fail if what I inputted is less than or greater than the selected Recipe range but should be Pass, if the inputted value is not less than and not greater than the selected Recipe range.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Virikefe22 

    I am not getting the distinction.

     

    If someone enters 5 in the BD and then changes the Recipe - it would be a fail with 5.

     

    Is it that you want the BD to clear when the Recipe is changed?  And that the status would be nothing until something is entered in the BD?

     

    Trying to understand your logic on it.

  • Virikefe22 Profile Picture
    302 on at

    Exactly, the Status should be nothing until the BD value is entered then it'll change to either pass or fail, checking the values against what is selected in the Recipe ranges.

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Virikefe22 

    Very good!  Then do the following:

    On the Combobox OnChange action, add the following formula:

    Reset(DataCardValue4_1)

    Then change the DefaultSelectedItems property of your pass fail to:

    If(!IsBlank(DataCardValue4_1.Text),
     With({_val: IfError(Value(DataCardValue4_1.Text), 0)},
     {Value:
     If(_val < DataCardValue3_1.Selected.Lower || _val > DataCardValue3_1.Selected.Upper, "Fail", "Pass")
     }
     )
    )
  • Virikefe22 Profile Picture
    302 on at

    Thanks @RandyHayes It's working fine as expect with the input change the values from Pass to Fail accordingly. But one more thing. Each time the value is entered, it changes but when I move to the next input or click outside the input field, the values erases from the BD combobox and then the pass or fail clears off too.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Virikefe22 

    Do you happen to have a formula in the OnChange action of the input?

  • Virikefe22 Profile Picture
    302 on at

    Yes, which is this you asked me to input first: 

    Reset(DataCardValue4_1)
  • Virikefe22 Profile Picture
    302 on at

    Ok, I got this now. It's the Status card you mean I should apply both the OnChange and DefaultSelectedItems code to.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Virikefe22 

    No, the Reset formula should be on the Recipe control DataCardValue3_1

    The DSI formula should be on your Status control.

    The BD (DataCardValue4_1) control should have no formula in the OnChange.

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard