Skip to main content
Participant
January 11, 2018
Answered

calculation problem

  • January 11, 2018
  • 2 replies
  • 871 views

Hi everybody, I am using the following...

title.p.text = 'team1' +   Number(loadedData[1][10]) + Number(loadedData[1][11])) * 100 + ' ' + '%' ;

my problem is that the last part   (+ '%') is  not  working, I suppose that the numerical function has not been stoped, thats why I can not see %

any suggestions?

Regards

Pancho

This topic has been closed for replies.
Correct answer ClayUUID

Why are you doing + ' ' + '%' instead of just + ' %' ?

In fact, why are you putting a space between the number and the percent sign at all? That's not normal formatting.

Anyway, you should be wrapping the entire math part of that code in parentheses.

2 replies

ClayUUIDCorrect answer
Legend
January 11, 2018

Why are you doing + ' ' + '%' instead of just + ' %' ?

In fact, why are you putting a space between the number and the percent sign at all? That's not normal formatting.

Anyway, you should be wrapping the entire math part of that code in parentheses.

Participant
January 11, 2018

I was just trying to separate the % from the rest, normally I will have them together, but still it does not help

JoãoCésar17023019
Community Expert
Community Expert
January 11, 2018

Maybe the size of your text field is not big enough and the percent sign is being cropped off.

Try setting the text to only '%' or another small value and see if it works.

Participant
January 11, 2018

Hi JoãoCésar

actually I tried that already but it didn't work.

Thanks for answering

JoãoCésar17023019
Community Expert
Community Expert
January 11, 2018

Check if your font is embedded and if it can show special characters.

If you don't know how to do it, select your text field, open the Properties panel, go to Embed > Character ranges and check Punctuation or All.