Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

JS' mapping return function

Dear Appery,

using PhoneGap to read email address', some of the records hold the value "undefined" so i added this code to that JS' mapping:

Image

code
if (value == 'undefined') {
return 'no email found';
}
/code

but this doesn't do the trick... what is the correct way to way to get this done?

Thx much in advance,
Best,
R.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

JS' mapping return function

Did you test to make sure that if-statement is executed?

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

JS' mapping return function

Hi Max,

indeed i dont get into the IF statement although the condition is true... i tried to remote debug it using apple safari but the problem is whenever the iPhone is connected to the safari debugger the button isn't click-able... once i disconnect the iPhone from the usb cord it is click able again... any other way on how to remote debug PhoneGap app? (i also try debug.phonegap.com without success)

TIA!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

JS' mapping return function

What is printed for value -- when you test in the browser?

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

JS' mapping return function

i get "undefined" as the returned value

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

JS' mapping return function

Hello! Please try this preif (!value) {
return 'no email found';
}/pre

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

JS' mapping return function

works!!

Image

Return to “Issues”