@avater4566 ,
you are facing an issue with the Patch function, here are some common reasons why this error might occur:
Incorrect Data Source: If Excelfile or collection does not refer to a valid data source or if there's a typo, the function would fail.
Delegation Warning: If Excelfile is a large data set and is not delegable, the LookUp function might not be able to retrieve the record, and thus the Patch function would be trying to patch a non-existing or invalid record.
Column Name Mismatch: The names used in the record schema of the Patch function must exactly match the column names of the data source.
Data Type Mismatch: Ensure that the value you're trying to patch matches the data type of the target column in the data source.
Access Rights: Check if the app has the correct permissions to write to the data sources.
Corrupted Excel File: If the Excel file is corrupted or not properly formatted as a table, this could also result in an error.
Syntax Error: If the syntax is incorrect, especially if you're using special characters or additional semicolons where they aren't needed, it could cause an error.
Excel as Data Source: Excel is not the best data source for writing back data in Power Apps, especially for concurrent use. If possible, consider using SharePoint lists or Dataverse, which are more robust for these operations.
Patch(Excelfile, LookUp(Excelfile, id = Concatenate(First([@PowerBIIntegration].Data).Id, selectedItemGallery.id)), {procentCompleted: DataCardValue1.Text});
If(IsEmpty(Errors(Excelfile)), Notify("Update successful"), Notify("Error: " & First(Errors(Excelfile)).Message, NotificationType.Error));
Kindly mark the solution as accepted if it resolves your issue.
Best Regards
Muhammad Mudassar Mazhar