Filter a field based on the content type in a view(Drupal 7) I need to remove a field for a view(Block) for a particular content type.

I have two different content types.One is Article and another is External News.

The following are the fields I added in the view.

Field:

      Content: Title
      Content: Post date
      Content: External URl
      Content: Last comment author
      Content: External URl

CONTEXTUAL FILTERS:
   Content: Has taxonomy term ID

FILTER CRITERIA
    Content: Published (Yes)  AND
    Content: Type (in Article, ...)
     AND
     Content: Has taxonomy terms (with depth) (= Technology)  AND | Settings
     Field: Tags 


Here I need the field Last Comment author to display only when the content type is Article and not for External news. 

Can Anyone help me how to filter the field based on the content type for a view block
You can use a preprocess hook to build in some logic to now show the last comment when the content type if of the type is External news. You need to add the content type and exclude it from display. That will make the value available in the preprocess hook.

You could use hook_preprocess_views_fields for this.