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 / Data Validation in gal...
Power Apps
Unanswered

Data Validation in gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

i have a requirement which might sound confusing and i am not able to achieve it so reaching out for help.


i have a gallery with multiple month columns (Jan,Feb,March), now when i hit the edit button i can edit the data.  

 

Now the user have a specific requirement, this is in regard to resource utilization. The total resource utilization of an employee for a month cannot be greater than 1. 
Now, as you see in  the below image , what  i am trying to explain is , if lets say user A has a project ABCDEF for which his utilization for the month of Jan is 1 then if he is being assigned another project his utilization for the month can be only 0 , as he is already assigned 1 for month of Jan for project ABCD. 
image.png

 

so while the user is entering the number and moves on to the next input , the app should check for all the lines for that particular employee in the collection and calculate the total and if the sum is equal to 1 then only 0 can be entered but if it is less than 1 then the user can only enter the 1 - total number. 

i hope it makes sense , i know it can be a little confusing if you need more help do tell me , but it is a really necessary requirement and would appreciate if someone could help me out  in this.

 

Thanks in advance guys.

 

Categories:
I have the same question (0)
  • SkiDK Profile Picture
    1,016 on at

    Hi @Anonymous 

    Maybe you can do next. 

    Make sure all the month input boxes are format Number and put your validation in the 'Max Length' property of the input fields.

    Capture.PNG

    In the Maximum Length property you could take the total sum of all the lines and if it's 1, then max length is 0 and if lower max length is 1. I'm not exactly sure on what it exactly is you have to filter, but here's an idea to put in the Maximum Length property of the input boxes:

    If(
     Sum(
     Filter(colProjects, employee = "John Smith", month = "January" ), 
     WorkLoad
     ) >= 1,
     1,
     0
    )

     Hope this helps. Let me know if I misunderstood.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @SkiDK i do allow text values too in those column, however if we make it number value. what i would like to do is to filter out all the values of that particular employee sum it up and see if the sum is greater than 1 and if it is it automatically becomes 0 and if not you see a message saying you can enter 1-total sum value = answer in the text box. 

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 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard