Very Basic Math Functions Problem

zenanoNoob

Новичок
Регистрация
01.10.2019
Сообщения
11
Благодарностей
0
Баллы
1
Hello, I have this price number 3,950.00 that I want to do this basic math on: 3,950.00*10/100 when I write it on set value command it just writes it the way it is, it does not actually calculate, and if I use javascript :
{-Variable.Pricetrimmed-}*10/100 it just gives 95, so it reads first number as 950 it does not read the 3,950.00, maybe I could use regex to format 3,950.00 to 3950, I just couldnot find that regex, also it a really good feature to be added to next versions: Basic Math Functions Calculations
 

zenanoNoob

Новичок
Регистрация
01.10.2019
Сообщения
11
Благодарностей
0
Баллы
1
I forgot to say that the price is a variable and it changes, it comes in these formats : 14,950.00 + 3,950.00 +700.00 + 77.00 + 7.00
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
For zenno, all numbers are strings.
You can do simple increase or decrease value from variable (not decimals, only integer).
To do mathematic operations you must run a c# our java code.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 180
Баллы
113
Hey @ZennoNoob
It is very easy. In the same javascript action you mentioned, just replace comas with nothing before.
 

Yuriy Zymlex

Moderator
Команда форума
Регистрация
24.10.2016
Сообщения
6 366
Благодарностей
3 292
Баллы
113
I forgot to say that the price is a variable and it changes, it comes in these formats : 14,950.00 + 3,950.00 +700.00 + 77.00 + 7.00
For zenno, all numbers are strings.
You can do simple increase or decrease value from variable (not decimals, only integer).
To do mathematic operations you must run a c# our java code.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)