Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Server Code Service - Request Query String

hi,

I'm running some server code to group and sum data.

Then in the app I'm running a server code service, which gives the following response

[{
"totalSum": 8,
"Gamer": "JOHN",
"Location": "A"
}, {
"totalSum": 20,
"Gamer": "ALAN",
"Location": "A"
}, {
"totalSum": 21,
"Gamer": "FRANK",
"Location": "B"
}]

I'm trying to use "where" as a request query string as follows

{"Location":"B"}

but it has no effect on the response.

This method works fine for normal database services, is their an issue with running it for server code services?

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Server Code Service - Request Query String

Hi Paul,

You would need to pass the where clause as a parameter to your server code, in your server code add the same parameter , and then in the server Code ... read the parameter in the server Code and use it in the queries in the server code queries to extract the data.

Make sense ?

Best,
Bruce
a href="mailto:Bruce.stuart@the-software-studio.com" rel="nofollow"Bruce.stuart@the-software-studio.com/a

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Server Code Service - Request Query String

Hi Bruce,

thanks for getting back to me. Is their no way of running a query on a server code service response?

Best

Paul

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Server Code Service - Request Query String

Hi Paul and Happy Friday,

You can certainly take the server side results that come back - and 'filter' them prior to presenting them on your UI (if that's the goal - and I presume it is....) - and you can perform multiple steps after data retrieval and prior to presenting the data on the UI.

Attached below - please find an example below where we do multiple steps after the data comes back prior to - in the last step - where we present the data :

Image

This goal could also be accomplished with a generic service - we just find using the Javascript to be much more efficient -and quick.

Let me know if that makes sense....

Bruce Stuart
a href="mailto:Bruce.Stuart@the-Software-Studio.com" rel="nofollow"Bruce.Stuart@the-Software-Studio.com/a
(253) 678-3348

Image

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Server Code Service - Request Query String

Hey Bruce,

thanks a lot mate, using local storage to accomplish what I need.

best

paul

Return to “Issues”