It may be that somewhere in the app you have removed the button or icon that was used to Collect mycollectionname. Without the Collect or ClearCollect function defining the collection it doesn't exist. Obviously, you can't clear something that doesn't exist. To test this, put a button on a screen and Collect(mycollectionname, datasource). I don't think you even have to actually collect it.