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

Popular posts from this blog

Linksys Wireless Connection Failure

The security validation for this page is invalid. Click Back in your Web

Power Apps toPower Automate Error - The input body for trigger 'manual' of type 'Request' did not match its schema definition , the input String does not validate against the date