Skip to main content
steft66579364
Known Participant
March 8, 2017
Answered

Help with code for form field , Pass or Fail

  • March 8, 2017
  • 1 reply
  • 621 views

Hi,

I have a form field ( Text 6) I want to populate with pass or fail based on the data from another field ( Text 63)

The other field ( Text 63 )has a number in it , if it is less that 6 I want " pass" input into the form field ( Text 63)

if the number is bigger that 6 I want "fail" in put into the form field.

This is my code: Calculation

var v = this.getField ("Text63");

if ( v.value < = 6); {

event.value = "Pass";

}

else{

event.value = "Fail";

}

I get Syntax error ; syntax error

2: at line 3

Not sure how to get rid of the alarm as I have tried many different things

I am a beginner

Thank you

This topic has been closed for replies.
Correct answer Bernd Alheit

Use this:

if ( v.value <= 6) {

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
March 8, 2017

Use this:

if ( v.value <= 6) {

steft66579364
Known Participant
March 8, 2017

Hi Bernd,

Much appreciated

Thank you