Page 1 of 1

How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Sat Nov 24, 2012 5:49 pm
by srikanth

How to use a value from a local storage variable in a where clause?
and also using the contained in ($in) comparison?


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Sat Nov 24, 2012 5:54 pm
by maxkatz

Do you need to use it in mapping or when you test the service?


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Sat Nov 24, 2012 6:50 pm
by srikanth

while mapping, using request.


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Sat Nov 24, 2012 7:37 pm
by maxkatz

How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Sat Nov 24, 2012 7:55 pm
by srikanth

What i needed was help with what the exact query shud be for the where clause. While mapping. i.e
I have a collection with 2 columns. "type" and "city" ,what we want is a response of all rows 'where type contains "xyz" '

Also i have a local storage variable's value ("xyz") that i need to use in the above where clause.


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Sat Nov 24, 2012 8:25 pm
by maxkatz

http://docs.tiggzi.com/documentation/...

To add another constraint:
{"priority": "High", "type":"some_type"}

You would define 'where' as the request parameter and then create the query in JavaScript. You can map one local storage variable as shown in the link above or read the variables using the API directly.


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Tue Nov 27, 2012 8:53 am
by srikanth

now confused....

by using this constraint as default for "where" request parameter works {"priority": "High", "type":"some_type"} but

we want the value of "priority" in this case "high" and "type" in this case "some_type" to be the values from local_storage variables and not predefined as default

If we have to use javascript, please can you give me a step by step sample


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Tue Nov 27, 2012 6:49 pm
by maxkatz

You would read the data from local storage:

var value1 = localStorage.getItem('name1');

then do something like this:

return '{"value":"'+value1+'"}';


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Wed Nov 28, 2012 7:32 pm
by srikanth

got it thankx!!!


How to use a value from a local storage variable in a where clause? and also using the contained in ($in) comparison?

Posted: Wed Nov 28, 2012 7:32 pm
by srikanth

Got it thankx!!!