Issue with SVG Image Code: "Unable to find table 'START:''

"data&colon;image/svg+xml;utf8,<?xml version='1.0' encoding='UTF-8'?>
<svg width='650' height='800' xmlns='http://www.w3.org/2000/svg'>
<foreignObject x='5%' y='5%' width='90%' height='90%'>
<body xmlns='http://www.w3.org/1999/xhtml'>
<style>
table {
font-family: Arial, sans-serif;
font-size: 12px;
width: 100%;
border-collapse: collapse;
margin: 0 auto;
text-align: center;
}
table, th, td {
border: 1px solid #000;
padding: 6px;
}
th, td {
vertical-align: middle;
}
.hdr-peach {
background-color: #FFD9B3;
font-weight: bold;
color: #000;
}
.hdr-yellow {
background-color: #FFFF99;
font-weight: bold;
color: #000;
}
.col-headers {
background-color: cornflowerblue;
color: #000;
font-weight: bold;
}
</style>

<table>
<!-- Top header row: 4 cells -->
<tr>
<td class='hdr-peach' colspan='1'>Category:</td>
<td class='hdr-yellow' colspan='2'>" & [Field1] & "</td>
<td class='hdr-peach' colspan='1'>Date:</td>
<td class='hdr-yellow' colspan='2'>" & [Field2] & "</td>
</tr>

<!-- Column headers -->
<tr class='col-headers'>
<th style='width:5%'>No.</th>
<th style='width:20%'>Field A</th>
<th style='width:20%'>Field B</th>
<th style='width:20%'>Field C</th>
<th style='width:17%'>Field D</th>
<th style='width:18%'>Field E</th>
</tr>

" & Start:[ChildList] & "
<tr>
<td>" & [Field3] & "</td>
<td>" & [Field4] & "</td>
<td>" & [Field5] & "</td>
<td>" & [Field6] & "</td>
<td>" & [Field7] & "</td>
<td>" & [Field8] & "</td>
</tr>
" & End & "

</table>
</body>
</foreignObject>
</svg>"                                                                    I’m working with an AppSheet automation template where I embed an SVG string using a data&colon;image/svg+xml format. The goal is to display values from a parent record (e.g., field1, field2) along with related child records (field3 to field8) from a child table (ChildList) using the Start: expression. 

However, I’m getting the following error:

"Unable to find table 'START:'"

3 REPLIES 3

I even tried using concatenate function, but it didn't work. Can anyone please help me with this?

Hi @Teja1112 , even I have faced this issue. @Suvrutt_Gurjar @WillowMobileSys Could you please help me with this issue?

@Nani @Teja1112 


@Teja1112 wrote:

" & Start:[ChildList] & "
<tr>
<td>" & [Field3] & "</td>
<td>" & [Field4] & "</td>
<td>" & [Field5] & "</td>
<td>" & [Field6] & "</td>
<td>" & [Field7] & "</td>
<td>" & [Field8] & "</td>
</tr>
" & End & "

 


The issue complained about by the error is this part above.  You are using the template START/END statement inside of an SVG definition inside of a template.

I have never heard of anyone generating an SVG based image of a table in this manner.  It is an interesting idea but, as far as I know, is uncharted territory and I have no clue how this might work without individual testing. 

Why are you using SVG to generate a table?
Why are you not using the typical way of creating a table in a template?
What is your desired end result?

First, SVG coding produces Images and typically they have been used, within AppSheet, in the App Formula of Image columns.   I am completely uncertain of how this might work when embedded into a template.  At the very least, I would suggest to REMOVE the START/END coding to see if you can even get a successful generation.

Second, the START/END statement would need to be wrapped in angle brackets OUTSIDE of quoted strings to even have a chance - e.g. <<...>>.  The angle brackets are PRE-processing indicators - i.e.  a signal to AppSheet to do some processing BEFORE the template generation takes place.   NOTE:  The field references would ALSO need angle brackets surrounding them. 

Again, even if this was all syntactically correct,  I have no idea of how the template generator would treat the resulting SVG encoding.  Will it produce an image of your desired table in the generated document?

 

Top Labels in this Space