Power Apps - Restricting the Text Box only Whole Numbers
We can restrict the a Text box to allow only number by making the Format TextFormat.Number as below.
But this will allow decimal Number. We can restrict the Text Box to allow only whole numbers by writing the formulae for the TextBox Onchange as below
If(
DataCardValue1.Text <> "" And Value(DataCardValue1.Text) <> RoundDown(
Value(DataCardValue1.Text),
0
),
Notify("Please enter number without decimals");
Reset(DataCardValue1)
)
Comments