cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] Return int value with character nbsp inside

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

My bad webscript return somes values but when it is int, it write the value with a space inside :

60 000
where the space between 60 and 000 is the character "nbsp" (view with sniffer)

to return value, I do :

<#if child.properties['sg:invoiceNb']?exists & (child.properties['sg:invoiceNb']?length !=0)>
                     <#assign val = "${child.properties['sg:invoiceNb']}"/>
${val}
I know how to replace some characters

<#assign val = "${child.properties['sg:invoiceNb']}"?replace('\'','')?replace('.','')?replace(',','')?replace(';','')?replace(':','')?replace(' ','')/>


How can I return value without this space  :?:

Thanks
2 REPLIES 2

mikeh
Star Contributor
Star Contributor

dranakan
Champ on-the-rise
Champ on-the-rise
Thanks MikeH Smiley Happy

To return int value, put "?c" in the <#assign

   
<#if child.properties['sg:invoiceNb']?exists & (child.properties['sg:invoiceNb']?length !=0)>
   <#assign val = "${child.properties['sg:invoiceNb']?c}"/>
   ${val}
</#if>