Don Schueler
Posts: 0
Joined: Sat Jan 04, 2014 12:20 pm

How to get count in query response

I see how to add the count = 1 parm to the query to get a count of the rows in my query but when I add the count variable in the response and map it I get "undefined" returned to the COUNT in the control. What am I missing? Count comes back in the JSON response in TEST fine.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How to get count in query response

Hi Don,

Can you show how you store the count variable and example of test response?

Don Schueler
Posts: 0
Joined: Sat Jan 04, 2014 12:20 pm

How to get count in query response

I am not storing it in a variable...it just comes back in the response and I try to map that result to a COUNT on a collapsible list..shouldn't that work?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to get count in query response

Does it work when you test the service?

Don Schueler
Posts: 0
Joined: Sat Jan 04, 2014 12:20 pm

How to get count in query response

yes, I see the value returned

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to get count in query response

But when you bind the value to a component on a page -- you get nothing?

Don Schueler
Posts: 0
Joined: Sat Jan 04, 2014 12:20 pm

How to get count in query response

here are screenshots...is this the right way to bind the count? Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to get count in query response

Also, the JSON structure that you get back from a test doesn't seem to match the service response structure that you have in mapping. It looks like you are mapping a collection.

Don Schueler
Posts: 0
Joined: Sat Jan 04, 2014 12:20 pm

How to get count in query response

I did add the count var both inside the collection as well as outside of it and the result was the same. Image

Return to “Issues”