Page 1 of 1

JS' mapping return function

Posted: Sat Nov 16, 2013 10:43 am
by Ram

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.


JS' mapping return function

Posted: Sat Nov 16, 2013 3:47 pm
by maxkatz

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


JS' mapping return function

Posted: Sun Nov 17, 2013 12:22 pm
by Ram

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!


JS' mapping return function

Posted: Sun Nov 17, 2013 6:44 pm
by maxkatz

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


JS' mapping return function

Posted: Mon Nov 18, 2013 10:10 am
by Ram

i get "undefined" as the returned value


JS' mapping return function

Posted: Mon Nov 18, 2013 12:50 pm
by Maryna Brodina

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


JS' mapping return function

Posted: Tue Nov 19, 2013 6:45 am
by Ram

works!!

Image