Page 1 of 1

Tiggzi database filtering

Posted: Sun Jul 29, 2012 6:48 pm
by GraceSalas

I'm using Tiggzi database and I can query my database by using {"ROI":{"$gt":14}}

How can I limit/filter the results of my service :
/[object_id],in]https://api.tiggzi.com/rest/1/db/coll... the application builder?


Tiggzi database filtering

Posted: Sun Jul 29, 2012 8:23 pm
by maxkatz

You tried the query in web console and want to set it up in the service?


Tiggzi database filtering

Posted: Mon Jul 30, 2012 6:14 pm
by GraceSalas

yes , I'm looking to show a sub set of the data that I have in my tiggzi database in the app screen base on criteria


Tiggzi database filtering

Posted: Mon Jul 30, 2012 7:09 pm
by maxkatz

To test the service, simply enter {"ROI":{"$gt":14}} for where request parameter.

When you map the service, set this up in JavaScript function:

code
return "{'ROI':{'$gt':14}}&quot
/code

you could also replace 14 with the 'value' mapped from the page.


Tiggzi database filtering

Posted: Sun Sep 09, 2012 4:46 am
by Sam K

I am attempting something similar. When I enter this in the tiggzi db Query ; {'mycat':{'$gt':'C'}}, I get the proper results.

Now in the restservice request parameter, I add where as a request parameter and {'mycat':{'$gt':'C'}} as default value. When I hit Test, it does not provide the same results. What am I missing? further to your suggestion above to add this to Javascript function. I am mapping this to a label in a grid; so does the javascript go to the grid javascript or the label javascript. I tried at both places and did not have any success.


Tiggzi database filtering

Posted: Sun Sep 09, 2012 6:13 am
by maxkatz

This should work:
Request name: where
Value: {'mycat':{'$gt':'C'}}