Google Fusion Table - coding problem in dynamic Info Window in the map

I have a Google Sheet with responses from a questionnaire to several people. One question was Post Code, so I now have a Map in Google Fusion Tables showing where they're all located according to Post Code.  That's all working fine, but my question is about the Info Window.  I've customized that to a certain extent, so now it only shows the fields that I want. But what I want to do is...

a) For some fields (checkboxes), only show it and associated data if the data is non-empty.

b) For other fields (multiple choice grid where the left column of the grid is 'None'), only show it and associated data if the data is NOT EQUAL to 'None'.

I've searched a lot in forums about this, and I've found many answers that use 'if' statements, but I can't get anything to work. Every time I use the curly brackets {} it thinks I'm trying to specify a column name, so I get 'Unrecognized column' every time I try using {if ...} or {template .contents}, or anything apart from {a name of one of my columns}.

Also, I've seen a lot of references to $data.value.name - but nothing that explains how I modify this to include the actual name of my column.

First of all, since (b) should be simpler, could you help me with that one first?

Thanks.
meirionwylltAsked:
Who is Participating?
 
meirionwylltConnect With a Mentor Author Commented:
I found the answer myself in the end, in this article...

https://support.google.com/fusiontables/answer/3081246?hl=en&ref_topic=2575652

Specifically the sentence "To use the new format, the first line must be {template .contents} and the last line must be {/template}. To include a column's value, use {$data.value.ColumnName} or {$data.value['Column Name']}: "

I didn't realise that to use {template .contents} you had to convert the whole code and change the way that all columns are referenced - even those without any dynamic data.
0
 
meirionwylltAuthor Commented:
found the answer myself
0
All Courses

From novice to tech pro — start learning today.