1

I am trying to assign a value to and output field based on an input field inside the modified Javascript step. I have coded as:

 if ( !(person_id.isNull()) )
person_nm = substr(another_field,1,10)
else
person_nm = "";

When I run this I get the error:-

Modified Java Script Value.0 - Javascript error: Modified Java Script Value.0 - TypeError: Cannot find function isNull in object 7853. (script#90)

  1. So where am I going wrong?
  2. In the else part I am actually supposed to assign a NULL to person_nm but I can't find a way to do so. Whats the way this can be achieved?

Thanks, Kanishk

Harkamal
  • 496
  • 3
  • 12
KKISHORE
  • 55
  • 1
  • 1
  • 6

2 Answers2

0

In modified java script you can use below condition.

  If (abc === null)
  {
  }
Harkamal
  • 496
  • 3
  • 12
Helping Hand..
  • 2,430
  • 4
  • 32
  • 52
0

IsNull() is not a vanilla Javascript function. It’s available in a number of frameworks, e.g. jQuery, but not in plain JS.

In plain JS, you can do:

if(!person_id)
    person_nm = substr(another_field,1,10)
else
    person_nm = "";
AlainD
  • 6,187
  • 3
  • 17
  • 31
nsousa
  • 4,448
  • 1
  • 10
  • 15