Re: Validation in powerapps
Hi @likhith117 ,
Seems the Type column is a Choice column, if so, you can set OnChange property of your QTY TextInput control to:
Note: remember to replace DataCardValueType, DataCardValueQTY and DataCardValueStockAvailable with your own control names.
If(DataCardValueType.Selected.Value="ISSUE" &&
Value(DataCardValueQTY.Text)> Value(DataCardValueStockAvailable.Text),
Notify("Entered stock is more than current stock!",NotificationType.Error))
This will reminder users if the entered QTY is more than stock available.
Then set DisplayMode property of your Submit button to:
If(DataCardValueType.Selected.Value="ISSUE" &&
Value(DataCardValueQTY.Text)> Value(DataCardValueStockAvailable.Text), DisplayMode.Disabled, DisplayMode.Edit)
Best regards,
Allen