Hi. I'm receiving this warning when performing validation of the user's data entered into a text box control in a gallery. The text box control is set up with the format property of 'Number' instead of text. The text box is used to collect a number between 0 and 100. I am using conditional formatting in the Color property to evaluate the number that's provided and then apply a red colour to the text if the number entered is <0 or >100 (or indeed '!IsNumeric' which shouldn't be possible with the Number format).
In the Monitor I see warnings (see attached example) several times when the Color property of this control is being evaluated. I've tried catching this with OnError, or using Coalesce to force a "0" value, or using an If command to pass "0". Nothing I've tried so far has worked. I know there are a few forum posts on this issue already but none of the suggested fixes have worked for me...
Any other suggestions please?
Below is an example of the code I've tried to resolve this.
=========================
If(
If(
Self.Text = Blank(),
0,
Value(Self.Text)
) > 100 ||
If(
Self.Text = Blank(),
0,
Value(Self.Text)
) < 0 ||
!IsNumeric(
If(
Self.Text = Blank(),
0,
Value(Self.Text)
)
),
Color.Red,
RGBA(
255,
255,
255,
100
)
)
//Coalesce(
// Value(Self.Text),
// 0
// )
Attached is an image showing the warning. Click to expand.
Thank you! This really helps. I no longer seem to get the warning for those particular text boxes.
Any tips for making a similar correction to a related text box that calculates the sum of all of those percentage totals in the gallery? The formula for that text box is currently:
Sum(galleryGrid.AllItems,txtPercentage)
If(
If(
IsBlank(Self.Text),
0,
Value(Self.Text)
) > 100 ||
If(
IsBlank(Self.Text),
0,
Value(Self.Text)
) < 0 ||
!IsNumeric(
If(
IsBlank(Self.Text),
0,
Value(Self.Text)
)
),
Color.Red,
RGBA(
255,
255,
255,
100
)
)
or
If(
Coalesce(
Value(Self.Text),
0
) > 100 ||
Coalesce(
Value(Self.Text),
0
) < 0 ||
!IsNumeric(
Coalesce(
Value(Self.Text),
0
)
),
Color.Red,
RGBA(
255,
255,
255,
100
)
)
both should work
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.