I have the following:

When I press Add my Project table gets patched and the an Id is automatically assigned by the SQL server.
That works smoothly.
Now I want to collect the Id of the project into a variable so:
As the last 2 lines in the Add button I have the following:
ClearCollect(Projects,'[PowerApp].[ProjectBoard]'.Id, '[PowerApp].[ProjectBoard]'.ProjectName);
Set(varProjectID, Filter(Projects.Id, Projects.ProjectName = TextInput3.Text));
But the last line fails with this error:
Incompatible type. We can't evaluate your formula because the context variable types are incompatible with types of vaules used in other places in your app.
Does anybody know why?
Or is there another way of getting the Id?