It doesn't gives me any error ... simply the result is a blank list, so I assume that the filter is not workinh.
I've tried also with the single quote as per your kind advice ... nope ... the result is the same unfortunately ...
So it is possible using a custom properties in an "if" statement into an app ... right ?
Custom properties are not available in the app script or expressions. Their purpose is for aiding capability assignment in the security rules model of Qlik Sense, not for data reduction in an app.
You may want to have a look at Section Access for controlling visibility to data: Managing security with section access ‒ Qlik Sense
With Section Access, the availability of data to a user is handled automatically at login by Qlik. Section Access is loaded as part of the load script where you bind a userid to a key field (in your case SalesOrder) within the application section of the load script.
Section Access load script can be created using inline statements or loading from a database. In theory you could assign custom properties and then access the repository database or QRS to load the users and their custom property assignments but I do not recommend this.