Jordi Niubo
Posts: 0
Joined: Tue Nov 26, 2013 12:08 pm

Edit result from service

I have a service that return all items from DDBB.

Each item have Name and Number (1,2,3,4,...99,..,).

In DDBB I have differents items with different Name and different items with the same Name .

The idea is: list all items but if in DDBB exist 2 or more items with the same name, list only one with the summatory.

Ex:
In DDBB:
Dani, 3
Albert,3
Jeff, 5
Dani, 8

List:
Dani, 11
Albert,3
Jeff, 5

My idea is call the service, save global list inside one local variable, edit local variable and call the service with echo.

My questions are:

  1. How i can save the list in local variable? I know how to save string but not arrays.

  2. Any one know any better method to do this?

    Thanks for your help

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

Edit result from service

Hello! [quote:]How i can save the list in local variable?[/quote]prelocalStorage.setItem("varName", JSON.stringify(data));/pre[quote:]Any one know any better method to do this[/quote]you can use server code or generic service, but it's more difficult to implement and requires some coding.

Jordi Niubo
Posts: 0
Joined: Tue Nov 26, 2013 12:08 pm

Edit result from service

Thought I could not save directly

thank you very much Maryna

Return to “Issues”