Expression was unable to be parsed: Number of opened and closed parentheses does not match

Good morning,
Can anyone explain why this code is not working!!!
I got this error:
 Expression was unable to be parsed: Number of opened and closed parentheses does not match.

Show More
Concatenate("data&colon;image/svg+xml;utf8,<svg width='350' height='",300,"' viewBox='0 0 350 ",300,"' xmlns='http://www.w3.org/2000/svg'>
<g id='table'>
<!-- background color -->
<rect width='350' height='685' fill='%23e0e0e0'></rect>
</g>
</svg>")

When i remove this ",300," and replace it with 300, the code works.
Thanks

 

Solved Solved
0 8 312
2 ACCEPTED SOLUTIONS

Aurelien
Google Developer Expert
Google Developer Expert

hi @Justfateh 

try replacing all ' with "" (2 quote marks)

such as in here:

CONCATENATE("data&colon;image/svg+xml;utf8,
 <svg xmlns=""http://www.w3.org/2000/svg"" viewBox=""0 0 160 160""> 
    <circle cx=""80"" cy=""80"" r=""60"" fill=""none"" stroke=""white"" stroke-width=""22"" /> 
</svg>"
)

View solution in original post

Works for me:

Concatenate("data&colon;image/svg+xml;utf8,<svg width=""350"" height=""",300,""" viewBox=""0 0 350 ",300,""" xmlns=""http://www.w3.org/2000/svg"">
<g id=""table"">
<!-- background color -->
<rect width=""350"" height=""685"" fill=""%23e0e0e0""></rect>
</g>
</svg>")

View solution in original post

8 REPLIES 8

Sometimes it is an issue with ' or " pairing.

Have you check them as well?

Aurelien
Google Developer Expert
Google Developer Expert

hi @Justfateh 

try replacing all ' with "" (2 quote marks)

such as in here:

CONCATENATE("data&colon;image/svg+xml;utf8,
 <svg xmlns=""http://www.w3.org/2000/svg"" viewBox=""0 0 160 160""> 
    <circle cx=""80"" cy=""80"" r=""60"" fill=""none"" stroke=""white"" stroke-width=""22"" /> 
</svg>"
)

i tried but it doesn't work. 
I used "SVG Icon Tool" to convert the SVG Code to this format

Works for me:

Concatenate("data&colon;image/svg+xml;utf8,<svg width=""350"" height=""",300,""" viewBox=""0 0 350 ",300,""" xmlns=""http://www.w3.org/2000/svg"">
<g id=""table"">
<!-- background color -->
<rect width=""350"" height=""685"" fill=""%23e0e0e0""></rect>
</g>
</svg>")

Thanks a lot

 

Aurelien
Google Developer Expert
Google Developer Expert

So...basically my suggestion works, right ? ๐Ÿ˜‚

yes
thank you very much

I create an image SVG looks like receipt

if there is one product

1.jpg

 

 

 

 

 

 

 

 

if there is more..

the receipt will expand

2.jpg

so, thank you all in this community.
i'm learning from you.

thank you

 

Top Labels in this Space