Hello Everybody,
I am patching data to various SharePoint lists and want to stop all patching of data if a certain condition is met.
In the case below I want to stop the patch if the fields OperatorDropDown.Selected.Operator || BoxDropDown.Selected.Box || Value(SlotNoText.Text) are blank or not selected. I am attempting to stop the patch with the If(IsBlank(.... on the second row of code. Ideally I need a solution which just stops executing the remaining code at this point, displays an error message and stays on the same screen which is RCATrackOut.
Set(RCACount,Sum(ForAll(Filter(RCAData, BatchID = DataCardValue16_2.Text && WaferID = DataCardValue28_2.Text),0),Value));
If(IsBlank(OperatorDropDown.Selected.Operator || BoxDropDown.Selected.Box || Value(SlotNoText.Text)),Notify("Some of the fields are empty",NotificationType.Error, Navigate(RCATrackOut)));
Patch(RCAData, LookUp(RCAData, BatchID = DataCardValue16_2.Text && WaferID = DataCardValue28_2.Text),
{
TrackOutTime: Now(),
TrackOutComments: DataCardValue29.Text,
TrackOutOperator: OperatorDropDown.Selected.Operator,
Box: BoxDropDown.Selected.Box,
ProductID: DataCardValue5_1.Selected.Value,
SlotNo: Value(SlotNoText.Text),
ProcessCount: RCACount+1
}
);
Patch(BatchTrack, LookUp(BatchTrack, 'Batch ID'=DataCardValue16_2.Text && 'Wafer ID'=DataCardValue28_2.Text),
{
State: {Value: "TrackIn"},
OpCode: 20,
Box: BoxDropDown.Selected.Box,
'Slot No': Value(SlotNoText.Text)
}
);
ResetForm(Form1_1);
Reset(OperatorDropDown);
Reset(BoxDropDown);
Reset(SlotNoText);
Navigate(BrowseScreen1)
Thank you in advance.