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

Notifications

Announcements

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)
  • 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. 

     

  • BCBuizer Profile Picture
    22,510 Super User 2025 Season 2 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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 408

#2
WarrenBelz Profile Picture

WarrenBelz 382 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 328 Super User 2025 Season 2

Last 30 days Overall leaderboard