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 / How to save a text box...
Power Apps
Answered

How to save a text box with Blank along with validation

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi team, 

I want to save a text box with validation.

however it is working fine, but on top of this, we want to save along with blank.

When I try to save with blank value, the second condition is triggering with "Upto One decimal value is allowed, please try again!"

The requirement is

"the textbox field should only allow positive values between 0 until 24.0 (one decimal) because we would like to capture how many hours they spent on this task. we assume no one is working more than 24 hours on any tasks
but the filed can be optional (blank) if they don`t want to capture any data"

 

any assistance, please how can I save with blank value.

If(
Value(txtEfforts_2.Text) > 24,
Notify(
"Maximum Efrort value should not Exceed 24, please try again!",
NotificationType.Error
) Or Value(txtEfforts_2.Text) / Value(
RoundDown(Value(txtEfforts_2.Text),1)
) <> 1,
Notify(
"Up to One decimal value is allowed, please try again!",
NotificationType.Error
) )

 

I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Use this method to verify, no error will be reported even if the value is empty

     

    If(
    Value(txtEfforts_2.Text) > 24,
    Notify("Maximum Efrort value should not Exceed 24, please try again!",NotificationType.Error),
    Value(txtEfforts_2.Text) / Value(RoundDown(Value(txtEfforts_2.Text),1)) <> 1 And !IsBlank(txtEfforts_2.Text),
    Notify("Up to One decimal value is allowed, please try again!",NotificationType.Error)
    )

     

    Best Regards,

    Bof

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
Vish WR Profile Picture

Vish WR 482

#3
WarrenBelz Profile Picture

WarrenBelz 384 Most Valuable Professional

Last 30 days Overall leaderboard