How does Views know that The View Created By The Views Field View Module is not returning a result - on a row-by-row basis? I will hypothesize that Views is probably able to suppress the output of a field because very early on the process of creating/rendering the View, when the Views query is done, that field comes empty-handed from the database, and somewhere, internally, Views says: NO SHOW.
In my experience, I have never heard of a Views hook that allows a third-party module to short-wire this process and for example, arbitrarily command Views to render a field as it were populated, even if it is not, because a third-party module used that field as a contextual argument, created a view (or got data from somewhere else), and inserted that data into that otherwise empty field. This is what are you trying to do, and simply put, I am not sure if it is possible at all, at least in the way that you are trying to do it.
It would be possible however, for you to:
- Create a primary view.
- Create a custom preprocessor or template for that field. You would look for the proper name of the template by clicking your View's theme information link. A few caveats: For a preprocessor to be called, a matching template must exist first; Views won't recognize the preprossor (won't call it) if you declare it in a custom module, you will need to put it in your template.php; It isn't really necessary for you to create a preprocessor, however if you want to keep your templates clean (and any Drupalista worth his salt should want to) a preprocessor implementation is in order.
- In your preprocessor, if that field is not empty, pass the results of that field to your secondary View's filter. This will require you to instantiate that View programatically.
- If your secondary View returns any results, append those results to the current field.
So in essence, I think that what you want to do is 100% possible. I think your requirement will be possible (with Views) depending on A) How comfortable you are hacking with Drupal and it's theming layer, B) The performance requirements of your application.
If you are trying to do this for a high-performance site with a large number of visitors, I would be very wary of the solution that I am proposing, even with full Views caching turned on. So for performance and simplicity's sake, you can make your own database queries the ol' fashioned way. IMHO, your web server's CPU and whoever interacts with your site, clients and coders included, will appreciate it. Otherwise, if you still decide to go with my solution, here's a PROTIP:
- Go to the Views advanced settings options.
- Select show query.
- Go back to your primary and secondary Views and test them. The query that is used to construct your Views will be revealed to you.
- Copypasta this into your custom module for usage with db_query().
- ...
- Profit!