Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions

Question

Understand the different approaches to job design. page 167

Answered: 1 week ago