Expand my Community achievements bar.

Validate

Avatar

Level 2

Please need your help

I have this

 

if

(this.rawValue == null)

(this.rawValue <="2000")

xfa.host.messageBox("Message");

endif 

But is not woking.  What I need is a message when the numericField is under 2000 but I dont want the message to show at 0 when the Form is open.

here is what happen. I have a form that calculate 3 numericfields When the Form is open the 3rd numeric field as a value of "0" and I need a Message Box to work after I untroduce some numbers on thefields.

Thank You.

3 Replies

Avatar

Level 2

I have This but I need a range Within 1 and 2000

if ((this.rawValue == null ) || (this.rawValue == "2000")) {

xfa.host.messageBox("Message");

}

I need the messageBox when the value is under 2000 and over 1

Thank You.

Avatar

Former Community Member

How about this on the ready:form event on the form root?

// form1::ready:form - (JavaScript, client)

if (form1.page1.subform1.n3.rawValue > 1 && form1.page1.subform1.n3.rawValue < 2000) {

                    xfa.host.messageBox("The value n3 is GT 1 and LT 2000.");

}

Steve

Avatar

Level 2

Thank YOu Steve. Works grate if I use it on Validation.

If I use it at Form1::ready:form I don't get a result