Page 1 of 1

hide list items that value equals 0

Posted: Sat Jan 24, 2015 4:11 pm
by Vinny B

I am populating a list from the datasbase that contains number values. If the value is zero I dont want it to be displayed in the list.

So only values greater then zero will appear in the list.

is it possible?

Any suggestions on how to do this?

Thank you


hide list items that value equals 0

Posted: Sat Jan 24, 2015 7:06 pm
by Bruce Stuart

Hi Vinny,

Not sure exactly how you have implemented your list, but, if you are using standard list database service, you can use, instead of the list service, you can use the 'query' service for your collection .... And in the where clause , you would populate this with { "your field name you want to have be non zero" : "$ne: 0"} ...

You can read more here:
http://devcenter.appery.io/documentat...

Let me know if this hits the target or not.... Hope it helps,

Bruce


hide list items that value equals 0

Posted: Sat Jan 24, 2015 7:09 pm
by Bruce Stuart

Oh... Ps ... If you do change services that are populating the list, be sure to leave the old service in place until after you have successfully migrated from service a to service b ....( add a new service w.o deleting the old one ) .... That way you won't lose any custom code and mappings until you are ready to move...


hide list items that value equals 0

Posted: Sat Jan 24, 2015 7:15 pm
by Vinny B

The problem Im having with ALL of the query examples is that they either return the entire row or none of the rows.

here is my database
Image

I want the row that says Monday to display in a list with all the numbers greater then zero.

Here is an image of my list.

Image

I need to drop the item that shows zero


hide list items that value equals 0

Posted: Sat Jan 24, 2015 11:01 pm
by Bruce Stuart

Vinny, thanks ... I understand a bit more. Perhaps a question for you then, have you considered storing your data in a more traditional manner ... Which would be a parent - child relationship where your column wise detail data actually is represented a rows in another collection ? That way your query can actually single out no zero rows ?

Or is there some driving business or design reason you decided on the flat design for your data ?

( most of the tutorials focus on a data design where each occurance of a data item is stored as a row ).

Not sure if that helps. Have a great Saturday.

Best,
Bruce


hide list items that value equals 0

Posted: Sun Jan 25, 2015 6:58 am
by M&M

Have a look at this image. The request parameters is set to show only the students whose student ID is greater than 50.

Image

http://devcenter.appery.io/documentat...


hide list items that value equals 0

Posted: Sun Jan 25, 2015 1:05 pm
by Vinny B

No i havent and i dont really understand that. But what i dont understand is if I can add a datafilter that will filter any word, why cant I have a jquery code that will filter everything ne:0