I'm not sure whether you are talking about users visiting a url such as sub1.mydomain.com and having that display all of a certain CPT that have a custom field 'subdomain' set with the value 'sub1'.
In which case you are talking about a multisite installation?
I'm not using a Multisite installation, it is based on the plugin 'Page as Subdomain'. In that way I can access a single page through a subdomain. Eg. hidden link can be accessed through sub1.mydomain.com.
When accessing that page I want to display content that is based on the subdomain (orginal the slug of the page). So my view needs an input variable that is filled by the subdomain/slug name.
E.g. the template view on the page:
[wpv-view name="all products based on subdomain" mysubdomain="sub1"]