Indeed, init is called multiple times. See new working example in reply below.
I'll try your suggestion.
Post
Replies
Boosts
Views
Activity
I've provided simplified working example in the reply below.
No I didn't try it as I'd like to have this in this view for better overview of those multiple views and separation of concerns.
First example was not totally correct, sorry. See new example.
I tried but I still get an error. Can you show an example for usage in Query and in view's properties?
Is there a possibility to define the string variable once and refer it in #Predicate and view's properties?