I built a IT inventory app.
Validation in powerapps
Switch(
DataCardValue26.Selected.Value,
"PURCHASE",
Patch(
Consumable_Master,
LookUp(
Consumable_Master,
Value(Dropdown1.Selected.Title) = Value(Title)
),
{Purchase_x0020_Qty: Value(DataCardValue29.Text) + Value(Dropdown1.Selected.Purchase_x0020_Qty)}
),
"ISSUE",
Patch(
Consumable_Master,
LookUp(
Consumable_Master,
Value(Dropdown1.Selected.Title) = Value(Title)
),
{Issue_x0020_Qty: Value(DataCardValue29.Text) + Value(Dropdown1.Selected.Issue_x0020_Qty)}
)
);
SubmitForm(Transaction_form);
this is the code for submit form.Here if Value(DataCardValue29.Text) is Qty requested. This should be less than stock available.If he entered value greater than available stock .The above process should be terminated and it should notify his stock is less.
please suggest a formula.