So hard...
I'm about to flat out give up on Tiggzi because it's so hard to do anything with the database. The documentation is sparse and when I ask for help through support or this board I get one-line answers with usually a link to some worthless documentation that I don't understand. This product seriously needs more detailed documentation on many things, primarily working with the database and massaging data you get back from it and put into the db.
I'm using the Tiggzi database.
In the database designer I put this in the query box for one f my collections:
{'StationID':'508985aae4b06210489f7e3c'}
It works fine. I get the correct records back.
I designed a REST service -- actually generated it from the Add Service... Database... option and in the supplied WHERE clause put this same query:
{'StationID':'508985aae4b06210489f7e3c'}
and that works when pressing the Test Button.
Since the 508 etc. has to be supplied dynamically, I delete that query from the REST designer and save the REST service...
I then add that service to a screen I did, which displays the records just fine using a grid when I do NOT add anything to the where clause in the mapping for that REST service on that specific screen...all records are displayed...
But when I put that same query {'StationID':'508985aae4b06210489f7e3c'} into the where clause of the where query, and run the test, NO RECORDS ARE RETURNED.
I've double checked the number I put in for the StatoinID, it's exactly correct.
Now I've spent another 5 hours trying to get one simple screen to work... not good.
NEXT, without the query I run all records and it works fine...
But I want to massage the data... so if there is a value in a specific field for one of the records in the grid, I want it to display the data. If not, I want to display the words "closed' since there is no data.
So I search the community area here and found a related discussion and I try some code that 'works' there and it doesn't work at all for me. Here's the code I put in the Javascript popup for the screen control (a label) that I mapped a db field to.
var x = Tiggzi('OpenTimeLabel').text();
alert(x);
if (x == null || x.length==0)
{
Tiggzi('OpenTimeLabel').text("closed");
}
The alert always shows absolutely nothing for each record returned even though there is data there for all but one of the fields (the one I want to display 'closed').
A new alert pops up each record and x is nothing.
Another 2 hours wasted trying to find answers to a simple question and not finding one.
I think it would be good for the community and your sales and client retention rate if you hired somebody to do some thorough documentation on these things.
You should also put a warning in red letters: Unless you know Mango DB and Javascrpt and JQuery, don't attempt to use this software. You will kill yourself in frustration trying to get anything done in a reasonable about of time.