Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Problems Scripting a NumericField event...

Niederfuchs
Level 2
Level 2
Hello,



I do have a problem scripting an event for my numericField - I want the numericField to hide another object if the user enters 0 in the numeric field. Unfortunately this script does not work correctly - and I do not know why and need assistance (if you can also tell me how to hide more than one object without subpages that would be wonderful, too...)



My non working script:

Formular1.superframe.administrator.NumerischesFeld4::change - (JavaScript, client)

if (this.rawValue=="0")

{

xfa.form.Formular1.superframe.administrator.compdistribdetail.presence = "invisible"

}

else

{

xfa.form.Formular1.superframe.administrator.compdistribdetail.presence = "visible"

}
2 Replies
Not applicable
Hi Soenke,

Your script must work on the exit event of the field, not in the change event. And also it would be better to make comparison on numeric fields without quotation marks. this.rawValue == 0 is better.

In further assistance and consultancy, do not hesitate to contact me.



asiyegunaydin@kgc.com.tr

Asiye
Niederfuchs
Level 2
Level 2
Thanks a lot - you were a great help !!!

And thanks for the offered further assistance as well...



Soenke