I'm going crazy with this simple formula to write

hello, please help me I’m getting crazy with the ()

I try to write : ( Input invoices-line-1-pu-RG’s value * Input invoices-line-1-qty-RG’s value ) * ( 1+ Dropdown invoices-line-1-tva-RG’s value / 100 ) :formatted as 1 028,58 €

It’s impossible, it keeps writting me a wrong formula automatically : ( ( ( ( Input invoices-line-1-pu-RG’s value * Input invoices-line-1-qty-RG’s value ) * 1 ) + Dropdown invoices-line-1-tva-RG’s value ) / 100 )

It’s writing it automatically bad parenthesis () and I cannot do anything about it. It’s been hours I try to write the good formula

ps : This is a simple formula for calculating the total price including tax, using the pre-tax price and the VAT rates

I had to write it differently, but this is interfering with the automation of the numbers in the red “Total sum incl. tax” column, because the priorities of writings are bad.

Maybe I’m wrong, but it’s getting me crazy :rofl: :scream:

Help is LOT appreciated

The calculation is good. But the problem is that when I put all the numbers, I have to click outside a box number (PU HT) and re-enter (change) a number to make the TTC red updated. Its not automatic (I’ve tried everything)

Do you have parenthesis turned on? I honestly don’t know why this isn’t on by default yet.

Yes it was. But I had to turn it off because it was writing automatically a wrong formula !

The good formula that I cannot write with parenthesis on is : ( Input invoices-line-1-pu-RG’s value * Input invoices-line-1-qty-RG’s value ) * ( 1+ Dropdown invoices-line-1-tva-RG’s value / 100 ) :formatted as 1 028,58 €

The wrong formula writen automatically with parenthesis on : ( ( ( ( Input invoices-line-1-pu-RG’s value * Input invoices-line-1-qty-RG’s value ) * 1 ) + Dropdown invoices-line-1-tva-RG’s value ) / 100 )

So I had to finish with writing a formula that is in the first picture where I don”t use the parenthesis

You can adjust the parentheses by choosing where to add the more value. That way you can make it the way you want. You have more control over the order that way. As an alternative there is a math JS plugin you can use as well if that helps.

Try disabling the new editor design and displaying parentheses in expressions. So you will see where the bubble put the brackets and fix it

Using parentheses is much easier.

One thing that may cause confusion and break expressions when writing an expression that uses static free-typed number (hardcoded number) is the fact that after type a static number you lost the ability to insert any mathematical operator in the same layer of the hardcoded number.

If you try to add a new operator it will be available just in the next layer (or piece in that expression). It means that a hardcoded number forces you to finish that piece in the expression and then start the next one.

There are some ways to solve this and it will be related if you need a positive or negative hardcoded number.

In your case it is a positive one.

So what you can do is use an Arbitrary text operator, type the number, then convert the Arbitrary text to number using the :converted to number operator and then continue writing the expression.

(Valor de Input invoices-line-1-pu-RG * Valor de Input invoices-line-1-qty-RG) * ((Arbitrary text :converted to number+ Valor de Dropdown invoices-line-1-tva-RG) / 100) :formatted as 1 028,58 €

Another way for your case, assuming that in mathematics 1 + A is the same as A + 1, is to start that second pice in the expression with the dropdown’s value instead the hardcoded number.

(Valor de Input invoices-line-1-pu-RG * Valor de Input invoices-line-1-qty-RG) * ((Valor de Dropdown invoices-line-1-tva-RG + 1) / 100) :formatted as 1 028,58 €

1 Like