I didn't test the exact syntax, but you want something similar to this.
if(isBlank(Lookup(datasource,Title=TitleDatacard.Text)),Patch(datasource,defaults(datasource),Form.updates,Patch(datasource,Lookup(datasource,Title=TitleDatacard.Text,Form.updates)
The IF checks to see if a Record with the same Title already exists. The title field is normally an index, but use any field that will be unique for a give record. If the Title doesn't exist (IsBlank) then patch the datasource using the defaults. That will create a new record. Otherwise Patch the datasource using a Lookup to update the existing record.