Hi All,
I am trying to build application where I can patch data from PowerApps to SharePoint on job progress.
Any help is highly appreciated.
The application intention is very simple to make a production output entries, when we register 1st time a batch no, product, equipment ,process with start time - it creates a new registry. then when we patch again, it finds the previous start registry and enters the finish time.
and to create multiple registry for the same process the same day.
Can you suggest me what should I improve in my formula? to get such result.
Any help is highly appreciated.

Start & Finish time in PowerApps has this code on text filter
glbRo.Start
glbRo.Finish
with this code it is not updating the finish time either on the SharePoint or on the app

Button on select property was this
With({dataItem: // Your Record
LookUp(SortByColumns(Test_MDP, "Start", Descending),
Product = Process_dropdown.Selected.Value &&
Equipment= Equipment_dropdown.SelectedText.Value &&
Process = Process_dropdown.SelectedText.Value &&
Batchno = Batchno_Textinput.Text
)},
With({newTrue: // Your criteria for a new record
(IsBlank(dataItem.Start) && IsBlank(dataItem.Finish)) ||
(!IsBlank(dataItem.Start) && !IsBlank(dataItem.Finish))
},
// Your Patch to the DataSource
Set(glbRo,
Patch(Test_MDP,
If(newTrue, Defaults(Test_MDP), dataItem),
{ Product : Product_dropdown.SelectedText.Value,
Equipment:Equipment_dropdown.SelectedText.Value,
Process : Process_dropdown.SelectedText.Value,
Batchno : Batchno_Textinput.Text
},
If(newTrue, {Start:Now()}, {Finish:Now()})
)
)
)
)
when i use this code i am not getting the finished time updated after lookup on the same registry.
instead i see i get new registry with start time as new line

Any help is highly appreciated. Thanks in advance.