Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

hidden zero value

Avatar

Level 1

Hello, How do I get hidden zero value when the calculation of the two field value with javascript. As example,

event.rawValue = NumericField1.rawValue * NumericField2.rawValue;  ?

Here are there any good examples of javascript calculation?

Thanks for your answer

2 Replies

Avatar

Level 10

I am not following your question..

But if you want to display the multiplication of two field values, then use FormCalc.. Because if has more in built functions for calculations than JavaScript. So you can avoid writing too many lines of script.

Place the following in the Calculate event of the display Field. Set the language to FormCalc.

NumericField1.rawValue * NumericField2.rawValue;

Thanks

Srini

Avatar

Level 1

Hi!

This code will probably solve your problem (but in FormCalc):

data.Main.Total::initialize - (FormCalc, client)

$ = data.Main.One*data.Main.Two

if ($ <> "0" ) then

$.presence = "visible"

else

$.presence = "hidden"

endif

Right?

Thanks

malaczarna