Expand my Community achievements bar.

Issues checking variable

Avatar

Level 2

I am trying to write some xpath mapping to look and see if a home phone is blank or a other phone is blank and to display a form if either are blank but I am unable to do so. I have pasted the code I am using for this below. Does anyone see anything that stand out to them of being wrong?

 

 

/process_data/formData/xdp/datasets/data/NewHireCheckList/homePhone

 

or

 

/process_data/formData/xdp/datasets/data/NewHireCheckList/otherPhone

then setting both of them equal to ''

Any help would be greatly appreciated.

2 Replies

Avatar

Level 10

Where are you writing the code? In Workbench Process (OR) in the form?

If you are checking in workbench, you have the condition checking functionality inside the Xpath mapping editor itself.

If you are checking in form, then the code you posted, does not work.

if(homePhone.rawValue == null || homePhone.rawValue == ""){

     //Write your processing statements here.

}

Thanks

Srini

Avatar

Level 2

I am writing this in a workbench process, sorry should have included that.

The code that I posted is from the xpath mapping but for some reason if either one of the fields are blank I am getting the form to show.

Any idea on what I might be missing?