I have a gallery which is showing items in a grouped collection, they are grouped by TimesheetID. I want to have a button in each row within in the gallery, when pressed the button should remove the current item from the SQL table and then refresh or rebuild the collection using clearcollect. I had this setup previously and working when I was not grouping the items in the collection, since I changed the collection to be grouped the Remove function no longer seems to work and gives me an error.
I was previously using Remove(MySQLDatasource, ThisItem);
Since grouping the collection being used in the gallery, using the above function now gives me "incompatible type: the item you are trying to put into a collection has a type that is not compatible with the collection". I'm trying to remove from the datasource not add to a collection so I don't know what is going on there.
I've also tried the following:-
Remove(
MySQLDataSource,
LookUp(
MySQLDataSource,
TimeSheet_ID = ThisItem.Timesheet_Id
)
);
Using the above gives me a different error: This formula uses scope which is not presently supported for evaluation.
How can I delete the current gallery item if neither of the above options work, is it because my collection is grouped by the timesheetID?