Question
In PowerApps Canvas App I have a gallery with each record textinput that sets the bordercolor to Red if the entered value is not between
In PowerApps Canvas App I have a gallery with each record textinput that sets the bordercolor to Red if the entered value is not between Min and Max.
Now I want to show an ErrorLabel outside this Gallery if one of the textinput bordercolor = RED. What I code on the onchange property of the Gallery TextInput:
With( { AntArrBeamMin: LookUp( AntennaArrayBands, AntennaArraySpec.Id = ThisItem.Id ).BeamTiltMin, AntArrBeamMax: LookUp( AntennaArrayBands, AntennaArraySpec.Id = ThisItem.Id ).BeamTiltMax }, If( IsBlank(txtAntArEditSector_1.Text) || (Value(txtAntArEditSector_1.Text) < Value(AntArrBeamMin) && Value(txtAntArEditSector_1.Text) > Value(AntArrBeamMax)), UpdateContext({varShowMessageError:true}), UpdateContext({varShowMessageError:false}) ) )
Problem here is foreach item It's setting the variable to true and then false, But I need to keep the variable to true if even 1 record is not correct.
ErrorLablel property visible: varShowMessageError
And in the Gallery on the TextInput property of BorderColor I have nearly the same code that works fine just need to show the error when on of the record has red bordercolor:
With( { AntArrBeamMin: LookUp( AntennaArrayBands, AntennaArraySpec.Id = ThisItem.Id ).BeamTiltMin, AntArrBeamMax: LookUp( AntennaArrayBands, AntennaArraySpec.Id = ThisItem.Id ).BeamTiltMax }, If( IsBlank(txtAntArEditSector_1.Text) || (Value(txtAntArEditSector_1.Text) < Value(AntArrBeamMin) && Value(txtAntArEditSector_1.Text) > Value(AntArrBeamMax)), RGBA( 186, 202, 226, 1 ), Color.Red ) )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started