Page 1 of 3

mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 3:40 am
by Mike4997955

Tiggzi builder is awsome. And your technical support has been great! I've make a clickable list with the Tiggzi database, and i have a local variable with the value of _id from the tiggzi database. How do i need to map the service to the UI, so i can get select the record with by _id? What are the input parameters?


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 4:04 am
by maxkatz

I'm not 100% sure I understand the question.. can you show a screen shot of the UI and what exactly you want to select?


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 4:41 am
by Mike4997955

OK here's the screenshot.
Image

My local variable, IdTag has the value of _objectId from the Tiggzi database. I want to get that record. I thought this would be the easiest way, but it didn't work. After accessing a single record in the Tiggzi database, i'mm looking for a simple way to retrieve it on another screen.

I can use a query with a unique value if that is easier.


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 4:51 am
by maxkatz

The local variable value is available on every page in your app.


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 12:39 pm
by Mike4997955

I know. I thought about that route, but it wasn't practical for all the data is have. I've used queries before. I just need help setting this one up. I thought that objectid would be easiest. The database shows the value in hex, so I wasn't sure if it was a numerical variable. Wanted to also make sure the ui is correct. Thanks.


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 1:41 pm
by Mike4997955

I mean, that the mapping is correct.


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 3:57 pm
by maxkatz

Database id is a string, it's just random number.

I'm still not clear what exactly you are trying to do. Can you show/describe the query you are trying to run?


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 6:58 pm
by Mike4997955

I want to query _objectId in the Tiggzi database, using a stored variable. I have the screenshot above.


mapping a search for the tiggzi database

Posted: Wed Sep 19, 2012 9:13 pm
by maxkatz

The mapping is almost correct. Instead of mapping it directly to the object, you need to add 'where' parameter:

'where'

then in JavaScript mapping, create a string that looks like this:

return "{'_objectId': 'id'}";

http://help.gotiggr.com/documentation...


mapping a search for the tiggzi database

Posted: Thu Sep 20, 2012 3:31 am
by Mike4997955

Ok, that works for a string, but i need to use a variable in my query. I tried this, but it didn't work:
return "{'name':localStorage.getItem('IdTag')}";
name is the column in the database, and IdTag is the local variable.