I have a views on a node with a multigrup: I need to enable "Group multiple values" for three fields and everything is quiet fine, but some fields are empty or have an integer "0" value and are skipped... this is wrong as I want them to be shown as "0" (but can't use "Count the number 0 as empty" as this work for the entire value, not for single grouped values).

Using "table" as style...

This is what I have:

(nid-0) 	(first-field-value-0)
									
		(first-field-value-1)

			
(nid-1) 	(first-field-value-0)		
					Z
		(first-field-value-1)	

			
(nid-2) 	(first-field-value-0)	X	
			
		(first-field-value-1)	Y

... in nid-0 I see nothing and realize they're both "0"
... in nid-1 I see one value and don't know which row is relative to
... in nid-2 everything is fine (X and Y are both != 0)

...

This is what I need:

(nid-0) 	(first-field-value-0)	0	
									
		(first-field-value-1)	0	

			
(nid-1) 	(first-field-value-0)	Z			
					
		(first-field-value-1)	0		

			
(nid-2) 	(first-field-value-0)	X	
			
		(first-field-value-1)	Y

empty values should render as "0" and in nid-1 Z is in the right place.

Thank you.

Comments

Elementica’s picture

Temporary solution is a fork of file /sites/all/modules/cck/includes/views/handlers/content_handler_field_multiple.inc at row 274 changing:

FROM if (!empty($output))
TO if (!empty($output)||($output=='0'))