simple calculation gives NaN result if the total is over 1000

Community Beginner ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

I have a simple calculation in the BALANCE field:
TOTALWTAX - DEPOSIT

the user enters the deposit amount and the balance is shown. However, this is only working if the total balance is under 1000. Over 1000 and I get NaN.

 

any thoughts on that?

thanks in advance.

TOPICS
How to , JavaScript

Views

46

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 10, 2022 Aug 10, 2022

Go to that field properties → 'Format' tab and select 'Number' there you can select number of decimals and currency sign if needed. Don't forget to remove util.printf from script if you use built in formatting.

Likes

Translate

Translate
Enthusiast ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

Can you share that file?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

sure...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

Problem is in "TOTALWTAX" field, util.printf format as string. Why not use built in formatting?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

i wanted to keep the decimal points down to 2. This was the only was I could figure out how to do it.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

Go to that field properties → 'Format' tab and select 'Number' there you can select number of decimals and currency sign if needed. Don't forget to remove util.printf from script if you use built in formatting.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 10, 2022 Aug 10, 2022

Copy link to clipboard

Copied

LATEST

Thank You! I knew there was an easy way to do it, but all my searches eneded up showing complex answers!

All is good now.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines