Hello Ondřej,
I'm posting additional info based on our discussion in other channel, so that others can see the possible solution to this aim too.
There is a possibility to filter the obtained collection using Filter method, which offers kind of a workaround for the limitation of single Where condition:
Documents.WithAllData.Where("ClassName = 'NAP.Projekt'").Filter(Osoba1 == Id)
Please note the difference in syntax of Where condition (string) and Filter condition (direct macro boolean expression).
Nevertheless, there is a more direct way to get the data and that is to specify corresponding ClassNames for the TreeNodeCollection that you get from the "Documents" entity.
With such approach, you will have the required columns available in the primary Where condition:
Documents.ClassNames("NAP.Projekt").WithAllData.Where("Osoba1 = " + Id)
One recommendation here - in case of frequent calls of such macro, it may be a good idea to restrict the columns you need to the minimum, by adding the Columns modifier method:
Documents.ClassNames("NAP.Projekt").WithAllData.Columns("DocumentName, Osoba1").Where("Osoba1 = " + Id)
This is an "extreme" version of columns subset, you can check the available columns e.g. in System app -> Macros -> Console and choose those you need in the place of your macro.
Cheers,
Zdeněk