Curt Dutilley
Posts: 0
Joined: Sat Sep 14, 2013 1:42 pm

JavaScript Variable issue

I keep getting variable is undefined. I have mapped the response to a javascript variable. When I test the service, it returns the correct data, but when i try to reference that javascript variable I keep getting an undefined error. Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

JavaScript Variable issue

Hello,

Could you clarify please where do you try to reference javascript variable? The scope of a JS variable is the region in which it is defined. You can try to use localStorage variable.

Curt Dutilley
Posts: 0
Joined: Sat Sep 14, 2013 1:42 pm

JavaScript Variable issue

After I posted, I tried using local storage variable and now I am gettign null as a response. I am invoking the service "on complete" Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

JavaScript Variable issue

You could try to do next:

  • remove "readprofileservice" service from screen;
  • "Automatically Create from Sample Response" on "Shift_UserProfile_read_service";
  • add service to screen;
    It should help.
Curt Dutilley
Posts: 0
Joined: Sat Sep 14, 2013 1:42 pm

JavaScript Variable issue

perfect, it worked. Thanks so much for your kind help!

Return to “Issues”