Conditionally remove / blank out field values in View using Views PHP

I am trying to build a map (IPVGM) of locations which will be used as a block appended to all entities of type Person. Locations are stored in a taxonomy, with an extra field to hold the coordinates. There are multiple fields in a Person that reference the Locations taxonomy (Field:birthplace and Field:other_locs), and I am trying to plot all of them on the same map. IPVGM can handle multiple locations per row, but the view I've been able to construct so far duplicates the birthplace in every row. This means that IPVGM constructs a map with (in this case) 4 birthplaces.

Conditionally remove / blank out field values in View using Views PHP

I'd like to use Views PHP to remove values for birthplace and birthplace coordinates in every row but the first one. I've had some luck trying to do this in the Output Code of Views PHP, but I think it needs to be handled in the Value Code area in order for IPVGM to pick up on the field values (or hopefully lack thereof). Any help? I looked at Views Distinct, and using a Global:PHP filter, but both of these would remove the entire row, when I only want to remove the birthplace & birthplace coordinates components.

Replay

Try to use Views Conditional.

Views Conditional is a simple module that allows you to define conditionals with fields in views.

Conditions include:

  1. Equal To
  2. Not Equal To
  3. Greater Than
  4. Less Than
  5. Empty
  6. Not Empty

Views conditional allows you to output text based on the result of the condition.

Category: views Time: 2016-07-29 Views: 0
Tags: views

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.179 (s). 12 q(s)