Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

spliting an array

I don't have a "where parameter"
what screen or service do you mean?

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

spliting an array

Sorry, my bad - it's currentorder parameter in currentorderervice service on Vegetarian_Pizza page.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

spliting an array

OK Maryna,

I sorry but this was the code that was used originally, details and result at the top of this post,

the data returned didn't allow me to map individual items in the array to labels
in the collapsible

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

spliting an array

If we understand correctly the problem is that data is saved, but you can't map it the way you need? If so there are two solutions:
1) you need to parse data using JS as we suggested here https://getsatisfaction.com/apperyio/...
2) In DB you have to save not array, but object

  • currentorder column type should be Object (not Array)
  • in mapping to currentorder parameter in currentorderervice service on Vegetarian_Pizza page add code (instead that one you have now)
    prereturn {"array": JSON.parse(value)};/pre
  • after you fill in currentorder column with data (at least one row) you have to change list/query services response in this collection. To do that run service test and when you have response click Automatically Create Service Response.
Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

spliting an array

Hi Igor,
as you can see I am still confused with this,
as you can see after I implemented your code I got an error, some other suggestions have been made, however could you take one mare look at this as I need to rule out your approach before I make the changes that have been made above, project is as you left it.

yhanks for your help

Return to “Issues”