I am using the below code to patch the records.
some time user forgets to input the Qty and click on the button, The records get posted with Blank Qty.
I want to stop patch code to run if the RecQty of any of the row is Null or Empty
I want notification that it cannot post ,
Please advise what correction to be done in the below code to obtain this result
ForAll(
Gallery9.AllItems,
Collect(colAllPartsReceipt,
Patch(
TablePartsReceipts, Defaults(TablePartsReceipts),
{
RecoNo:(First(Sort(TablePartsReceipts, RecoNo, SortOrder.Descending)).RecoNo)+1,
RecDate:DatePicker4.Value,
PartNumber:Upper(Label21.Text),
PartDescription:Upper(Label24.Text),
RecQty:Value(TextBox4.Value),
UnitCost:Value(TextBox4_1.Value),
Vendor:Upper(TextBox4_2.Value),
RecRemarks:Upper(TextBox4_3.Value)
}
)
)
);