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 / How to check input for...
Power Apps
Unanswered

How to check input for Quantity field to be field in base on max and min MOQ

(0) ShareShare
ReportReport
Posted on by 213

It is a shopping cart gallery. I want to check value key in base on min & max MOQ. 

Eg. MIN MOQ 12, MAX MOQ 12, quantity has to be 12

      MIN MOQ 2, MAX MOQ 12, quantity has to be 2-12

Any idea, to make sure user fill in accordingly.

 

screen01.png

Categories:
I have the same question (0)
  • Gochix Profile Picture
    1,935 Moderator on at

    @NurNida ,

     

    Set the Default property on your TextInput field to a variable varQuantity.
    Set the OnChange property on your TextInput field to:

     

    If(Value(Self.Text)>ThisItem.MaxQ,UpdateContext({varQuantity: ThisItem.MaxQ}),If(Value(Self.Text)<ThisItem.MinQ,UpdateContext({varQuantity: ThisItem.MinQ})));Reset(TextInput)

     


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    Hello @NurNida ,

     

    You can also enable modern controls and access the "Number Input" control, which allows you to define the range of the allowed values.

     

    Enable modern controls in "General" in "Parameters", and try it to see if it works well with what you need.

  • Gochix Profile Picture
    1,935 Moderator on at

    @WiZey ,

    Thanks for sharing the knowledge, I didn't know about this new control.

    This for sure would be a much better option and easier to control.

     

  • NurNida Profile Picture
    213 on at

    screen01.png

     

    Yay!

    This is new!

    Thanks @WiZey . It works well in gallery!

    Max and min was pull from SharePoint. I am using ThisItem.MaxMOQ to set Max value. 

  • NurNida Profile Picture
    213 on at

    Thanks @Gochix , varQuantity giving issues because I am using gallery. It will set all to same varQuantity  value. Anyway, it gives me some idea!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard