Hi All,
I am trying to develop app, when operator start to do an order, he will scan and the 1st scan of that particular orderno will patch data into sharepoint the order no, product, process, start.
when the job is finished for that orderno, the operator again scan the same barcode and this time it will lookup the orderno and patch the finish time for the order.

Set(
ExistingOrder,
LookUp('Aluminium Output', Orderno = BarcodeScanner1.Value));
If(
IsBlank(ExistingOrder),
Patch(
'Aluminium Output',
Defaults('Aluminium Output'),
{
Orderno:BarcodeScanner1.Value,
Start:Now(),
Product:Product.SelectedText.Value,
Process:Process.SelectedText.Value,
Operator:Operator.SelectedText.Value
}),
Patch('Aluminium Output',
ExistingOrder, { Finish: Now() }))

the issue at the moment with the formula is, same order no has different process, so i am not getting any registry if i scan different process for the same order.
i am stuck now, on what formula to modify so for the 1st scan of the order it will simply make the registry with start date/time, for the second scan it will lookup the process value and if the order no & process selection matches it will patch the date/finish time for the order, if the same order has different process selection it should create a new registry .
any help is highly appreciated.
Regards.