I am working on Teams power app.
Trying to use the below code in the gallery, that If the stockQty is less than the user's Input Qty then error message and set the Qty as the stock Qty
The default property of the TextBox is 1, therefore I put OnChange prorperty of the text box the below code:
If(ThisItem.StockQty<Value(Self.Value),ThisItem.StockQty;Notify("stock Qty is less than order",NotificationType.Warning,3000),Value(Self.Value))
During Testing the code found, Currenty Stock is 5, when the Input Qty is more than it brings the notification , but does not set the StockQty as the value the textbox.
I want if the user Input Qty is less than stock, then let the user qty as it is, BUT if User's Input Qty is more than Stock, the set the textbox value to StockQty.
Please advise what changes to be done in my above code.
