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 / Validation on Selectin...
Power Apps
Answered

Validation on Selecting Submit Button

(0) ShareShare
ReportReport
Posted on by 42

I created a PowerApp to allow employees to enter in a time allocation. I would like to ensure that on clicking the submit button on the "Edit Form" that if [Allocation 1] > 0 than [Fund 1] > 0. 

 

 

Sample Data:

Allocation 1 = 25

Fund = 

Allocation 2 = 40

Fund 2 = 3000

Allocation 3 = 30

Fund 3 = 2000

 

 

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Try wrapping an IF statement around the SubmitForm function.

     

    If([Allocation 1] > 0 && [Fund 1] > 0, SubmitForm([EditForm]), false)
  • skburke Profile Picture
    42 on at

    I tried your argument and I was on the same track except I realized that the fileds are text and not numbers. How would I rewrite the argument to indicate that if([Allocation1] is not blank and [Fund1] is blank than false?

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    This should return false when [Allocation1] is not blank and [Fund1] is blank

     

    Not(Not(IsBlank([Allocation1])) && IsBlank([Fund1]))
  • skburke Profile Picture
    42 on at

    This is close; however, for some reason even though I set the [Fund1] field default as "" the IsBlank command is reporting that the field contains data "true" even though I set it as "" and there is not data in Fund1. Any thoughts?

  • skburke Profile Picture
    42 on at

    I even tried to set the default of the input text field [Allocation1] to "Blank()" and IsBlank([Allocation1)] is still reporting false. I just do not get this. . .

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Are you testing this in designer? If so, look at the Default Mode property of the Form and if it says Edit change it to New and test again.

  • skburke Profile Picture
    42 on at

    I made the suggested change and "IsBlank([Allocation1])" is still reporting "false". The field shows not data and default value is set to "Blank()"

  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Remove the square brackets, so it looks like this:

     

    IsBlank(Allocation1)
  • skburke Profile Picture
    42 on at

    That seriously worked!!!!

     

    In matter of fact, instead of creating 20 nested "if than loops" to the submit icon, I simply used the following formula on the "Fund1" Data Card / Required Field to "If(IsBlank(Allocation1), false, true)". This way is there is no data in "Allocation1" than the "Fund1" requirement is false. If their is data in the "Allocation1" field than the "Fund1" requirement is set to true. This is a much cleaner solution and much easier to program.

     

    I appreciate the team effort in helping me solve my issue.

     

    -Shawn

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    It looks like the square brackets turned field value into a single-column table and IsBlank sees that table as a value.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard