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 / Restrict user to enter...
Power Apps
Unanswered

Restrict user to enter specific values in the text input

(0) ShareShare
ReportReport
Posted on by

hi Expert

i was trying to build an apps 

where the records shouldn't exceed 100% or 1 like table below

EmployeeAllocation
A0.35
b0.5
C1
A1
A0.5

 

i am trying to build an app where while entering the details monthly it will lookup the user sum it up and if its above than 100% or 1 than the field wont accept the record or else it will give a pop up message saying the value is not within the range. 

pokhani_0-1649088827036.png

 

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    There is no easy way to restrict text inputs to text boxes. As a workaround, you can add Labels below each Text Input box and set Text property. For example, Label below Jan input box is as follows:

    If(
     Sum(Filter(YourDataSource, Name = User().FullName),Jan)+ JanInput > 1,
     "Allocation for Jan shouldn't exceed 100% or 1"
    )

     

    You can also set Color of the Label to Red so that make them seem like warnings.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Community Power Platform Member Profile Picture
    on at

    hi Thank you 

    but am not getting any message when i walkaround your code 

     

    pokhani_0-1649345606024.png

    If(Sum(Filter(Forecast,Jan=Jan_DataCard1.DataField,EmployeeName=EmployeeName_DataCard2),Value(Jan))=1,true,false)

    data source

    pokhani_1-1649345766023.png

     

     

  • v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    Visible property only control the visibility of Controls, what do you have in Text property of the Label?

    Besides, Sum function accepts text column as the second parameter, so no need to convert using Value function.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Community Power Platform Member Profile Picture
    on at

    hi

    Thanks but this should only pop up if some one tries to enter the value >1, and its showing the same even its 1

    pokhani_1-1649420573229.png

     

    pokhani_0-1649420566981.png

     

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    The formula sums the January numbers for a specific employee in the list add add with the number typed-in in Jan Text input box then judge the result. I saw you have Jan number 1 for QA already in the list so you will get the total number >1 when input 1 in the text box. You can try and input 0 to see if it is right.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    Have you solved this issue?

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Community Power Platform Member Profile Picture
    on at

    Yeah but the suggested solution didnt workwout so had to create an new text input. 

  • v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    It's great! Would you please consider sharing the solution in detail so others in the community may get help from it? You can accept your reply to show this thread as solved.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard