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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!