FlowField CalcFormula with UserSecurityId()

I would like to add a new filter to this existing count (table extension)

        field(74855; MyOpenTasks; Integer)
        {
            FieldClass = FlowField;
            Caption = 'My open tasks';
            CalcFormula = count("To-do" where(Status = filter("In Progress")));
        }

It should be something like

CalcFormula = count("To-do" where(Status = filter("In Progress"), SystemCreatedBy = UserSecurityId()));

but VSCode doesn’t like the UserSecurityId() (that, btw. works fine in the OnModify-Trigger in the same module)

trigger OnModify()
begin
    if (Status = Status::Completed) then begin
        "CompletedBy" := UserSecurityId();
        "CompletedDateTime" := CurrentDateTime;
    end;
end;

I did it now not using a FlowField but, like MS is doing it, with some code…