I'm trying to create an asset management inventory app using PowerApps.
In the process of writing one record (Managementnumber, Confirmer, Confirmationdate) in the asset management Excel file using the code below when the write button is clicked (OnSelect), I intended to write it so that it would overwrite the record with the same Managementnumber.
But clicked repeatedly, the records will be added.
Refresh(Shisan);If(IsBlank(LookUp(Shisan,Managementnumber=TextInput1.Text)),Patch(Shisan,Defaults(Shisan),{Managementnumber:TextInput1.Text,Confirmer:TextInput1_1.Text,Confirmationdate:TextInput1_2.Text}),Patch(Shisan,LookUp(Shisan,Managementnumber=TextInput1.Text),{Confirmer:TextInput1_1.Text,Confirmationdate:TextInput1_2.Text}))
If it is immediately after some other operation (such as after writing another record), it will be overwritten properly. But clicked continuously, it will not work.
I thought it might be necessary to reload the "Shisan" table defined in the asset management Excel file, so I tried later adding Refresh to the beginning of the code, but the situation did not change.
Please let me know if you know how to deal with this.