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 / Powerapps field valida...
Power Apps
Answered

Powerapps field validation question

(0) ShareShare
ReportReport
Posted on by 165

Question..... and i think im close....

 

I have a field called Temperature (number field in sharepoint).  I want to put a range that the users can enter into it.  I also added a label.  i added this code and it works EXCEPT the Reset part.

 

If(Value(Temperature)<90 || Value(Temperature)>105,

     UpdateContext({ShowErrorMsg: true}); Reset(Temperature),

     UpdateContext({ShowErrorMsg: false})

)

 

i want to put this code on the submit button so that the user can NOT submit if the user is out of range.

 

i done understand why im getting an error on the Reset part of this.  I get a "Invalid argument type (Number), expecting a control value instead."  Not sure what that means. This is the only part of my code that is giving me an error.  What am i doing wrong here?

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Please you stated that Temperature is a Column in your list. What is the name of the Textbox to that users will enter the value 90.

    The red error is that before you are reset a column instead of the Textbox

    .------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

    If this error is happening in the label then the reason is that Reset() can't be used in a label but it can be used in a button. If you add this formula to the button the error should go away.

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @cnorris135 ,

    Please notice the Reset function's usage:

    The Reset function resets a control to its Default property value.

    So if you want to use this function, you need to pay attention to three points:

    1)you need to reset a control, not a variable

    2)you could not reset a control which has Default property, not including label control (not have Default property)

    3)you need to use this function in one action property

     

    Based on the formula that you provided, it seems like Temperature is a fieldname. So you got that kind of error message.

    Could you describe more clearly about the feather that you want? Do you want to reset the textinput for Temperature field? or anything else?

    If my assumption is right, you could try this:
    Reset(Temperaturetextinput)           //please replace with your control name

     

    Here's a doc about this function for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-reset

     

    Best regards,

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard