Kinson Sa
Posts: 0
Joined: Sun Mar 22, 2015 9:40 pm

Calling service inside mapping to return another value

Dear friends,

Let see if some one have some idea for the problem I have.

I have service that return to me a code for a product. I need to show also the name, as it is not in the same data-base.

So in the mapping I put this JS.

Code: Select all

 Apperyio.storage.SUBFAM.set(value.substring(0,6)); 

  nombre.execute({}); 

 return value + Apperyio.storage.GET_SUBFAM.get();  

Where SUBFAM is the code I send to nombre.
Then the service nombre I mapping the result to GET_SUBFAM.

So I return the value + de the name I get.

It nearly works the main problem is that when it execute nombre the service works but not arrive to on success. so it continue with return, then after sending all the value to nombre, it start doing all success events of nombre.

Image Image Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Calling service inside mapping to return another value

Hello,

It is not good solution to use service in the mapping. Especially which uses Storage variables. It connected with delay of the service's response before it's usage in the JS mapping.

Return to “Issues”