Hi All,

I try to develop app to record production output.
example, Operator choose their name, product, process -- & scan barcode of order. for the first scan it will collect the initial record of operator name, product, process and start time. 1 st time scan of the order denotes order started, 2nd time of same order denotes order finish.
i used this formula for scan & save data
Patch(
'Aluminium Output',
Defaults('Aluminium Output'),
{
Orderno:BarcodeScanner1.Value,
Start:Now(),
Product:Product.SelectedText.Value,
Process:Process.SelectedText.Value,
Operator:Operator.SelectedText.Value
}
)
and the value get saved in sharepoint list,

for the second time scan of the same barcode it denotes the order completed and lookup the order no & save the finish time.
i am struck here, what formula to use, when same order no scanned for 2nd time will lookup the value on sharepoint list and patch the finish time.
(1st time scanned it create new record in sharepoint list, 2nd time scan of same order it patch finish time for that order no)
any help is highly appreciated.