cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Numerical Value Input Validation

Ive found a few guides on this but doesnt seem to apply right with my configuration.

 

I am using a gallery as a equipment catalog to view and add items to cart. Each item has a QTY available listed.

 

I have a QTY input for users to select how much they want, where/how do I put in the validation that this number cannot exceed whats available?

 

Qty.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Numerical Value Input Validation

@CWileyRRT 

I'd handle this using the DisplayMode property of your Add to Cart icon. In pseudo code

 

AddToCart.DisplayMode = If( Value(QTYInput.Text) > Stock, DisplayMode.Disabled, DisplayMode.Edit)

 

You could also add a label "QTY exceeds Stock" - or similar - that has its Visible property set using this same logic

View solution in original post

1 REPLY 1
Highlighted
Community Champion
Community Champion

Re: Numerical Value Input Validation

@CWileyRRT 

I'd handle this using the DisplayMode property of your Add to Cart icon. In pseudo code

 

AddToCart.DisplayMode = If( Value(QTYInput.Text) > Stock, DisplayMode.Disabled, DisplayMode.Edit)

 

You could also add a label "QTY exceeds Stock" - or similar - that has its Visible property set using this same logic

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,991)