web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Do not allow null or b...
Power Apps
Answered

Do not allow null or blank in a numeric field while in edit or new form

(0) ShareShare
ReportReport
Posted on by

I am using a SharePoint list as a data source. The list has many columns that are numeric fields, tracking expenses in different areas. The default values of these numeric columns is 0. In my Power App, I do not want a user to delete the default value of 0 (or any amount) and make it null or blank. In other words, the field should contain an amount such as 59.62, or 0 if someone deletes an amount -- but never null or blank. How can I assure this occurs when the form is submitted?

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,620 Super User 2026 Season 1 on at

    Hi @AnnetteM ,

     

    Assuming you are using a form, you can add some verification to the OnSelect property of the button that is used to submit the form, for instance:

     

    If(
     IsBlank(DataCardValue1.Text) || Value(DataCardValue1.Text) <= 0,
     Notify("Blank or null values are not allowed"),
     SubmitForm(Form1)
    )

     

    The above will give a notification to the user if the DataCardValue1 text input control where they need to enter the number is blank or equal or smaller than 0. Else the form is submitted.

  • Verified answer
    BhargavPatel Profile Picture
    660 Moderator on at

    @AnnetteM on the database side, make the field required. That will throw an error when user tries to save the Form without any value in the field. This will also add asterisk in the DataCard to let user know it is a required field. 

    Snag_ca169d8.png

     

    Alternatively, on the app side, you can unlock the DataCard,

    Snag_ca984bc.png

    and then, change the Update property of the DataCard to:

     

     

    Coalesce(Value(DataCardValue.Text),0)

     

     

    So, when the form is submitted, it will enter 0 in the field if nothing was entered. 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 509 Most Valuable Professional

#2
Haque Profile Picture

Haque 302

#3
11manish Profile Picture

11manish 265

Last 30 days Overall leaderboard