Page 2 of 3
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 6:10 pm
by M&M
Just tried this query. Is this what you are looking for?
This query shows the employee whose name is Susan and the Age is greater than 25. Replace it with 0 and Monday in your case
And here is the query.
{"$and": [{"Age": {"$gt": 25} },{"Name": "Susan"}]}
The same thing you can dynamically use in jQuery I guess
M&M
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 6:20 pm
by M&M
I guess you are using the select drop down component and want to hide the counter value for those items that are zero. But I guess you will have to hide / show the counter for the entire component and not for individual items. Another workaround could be to change the text color (counter text color) to the same background color for only those items whose value is zero. Not sure if that'll work well though
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 6:25 pm
by Vinny B
Your query works fine but it does not do what i need.
. If you notice below it is still responding with the columns that have zero. i do not need a query since query will not solve my problem. I need to remove from the list view any item that has a zero.
Here is your query results.
FOR EXAMPLE:
In this page I need all the zeros not to show in the list and only show the products have a value above zero.
Maybe in Javascript I can hide the list
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 6:48 pm
by M&M
This should do the trick
What I did was to add couple of lines of JS. Then what it does is looks for value.Age <=33...and then hides that list item. In your case you will have to evaluate the required columns and hide based on that
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 6:58 pm
by M&M
Here's another trick that will yield the following
What I did was to map the Age to the counter visible property. Then based on evaluating age I return either true or false, thereby making the counter visible or invisible.
Just a small bit of JS code does the trick
if (value
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 7:38 pm
by Vinny B
Thanks but i need the entire list item to be hidden. In your example above only two items would show susan and michael.
I think you are on the right track. Maybe it can hide the list item. instead of returning true are false?
I really appreciate your help. This is for a customer and if i can get this to work then the entire app will be done and WE will have a customer for along time using my app and your database service.
Thank you
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 7:44 pm
by M&M
Yup, i had earlier posted the solution which hides the entire list if the age / value is lesser than a certain number
That post starts with "This should do the trick"....
Oh ya and btw I don't work for Appery
I just happened to be loitering on the forum while looking for my own solution to some other problem
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 7:57 pm
by Vinny B
Bro your my hero. I couldn't get help from Appery.io for the life of me. I really appreciate it. It works perfects.
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 8:01 pm
by M&M
cool 
query multiple columns and return everything greater then 0
Posted: Mon Jan 26, 2015 8:05 pm
by Vinny B
I cant help you with your build but i can tell you that I attempted to edit the source code a while ago with another user and Appery support. Appery support was very helpful but I always got build errors. If it wasn't a build error it was a export apk error.
I finally had to export the app to eclipse and add the plugin.
The plug in was adding ads to android app.