Page 2 of 4

empty label always display undefined

Posted: Wed Jan 28, 2015 7:58 am
by Evgene Karachevtsev

She,

Could you please clarify the credentials for test?


empty label always display undefined

Posted: Wed Jan 28, 2015 8:18 am
by She

Hi Evgene,

Thank you for replying, just follow the screen shot below:

Image

Image

Image

Image

Image

thank you, :)


empty label always display undefined

Posted: Wed Jan 28, 2015 8:24 am
by M&M

You can do a simple check in your JS - and return / set blank value in case null / or undefined is returned.

Or you can also add some JS to clear the labels in case the service encounters an error. On the REST call / mapping you can do it in the Error event

I am not sure what's causing it though as I don't have access to the code


empty label always display undefined

Posted: Wed Jan 28, 2015 8:29 am
by She

probably there's no error i already tried that


empty label always display undefined

Posted: Wed Jan 28, 2015 8:32 am
by She

empty label always display undefined

Posted: Wed Jan 28, 2015 8:35 am
by M&M

Can I see the mapping


empty label always display undefined

Posted: Wed Jan 28, 2015 8:38 am
by She

Hi M,

as you can see this is the service that i was calling : (screenshot below:)

Image

and it's empty. i already tried the following code in SUCCESS MAPPING run
JS:

if (data[0])
{
Appery('label1').text(" ");
Appery('label2').text(" ")
Appery('label3').text(" ")
}

but still,"undefined text" is showing

thank you,


empty label always display undefined

Posted: Wed Jan 28, 2015 8:39 am
by M&M

You are using a REST service right?


empty label always display undefined

Posted: Wed Jan 28, 2015 8:41 am
by She

Hi M,

Yes, 3rd party Rest


empty label always display undefined

Posted: Wed Jan 28, 2015 8:42 am
by M&M

Just a note - the semi colons are missing for your last 2 statements