Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

hide list items that value equals 0

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

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

hide list items that value equals 0

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

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

hide list items that value equals 0

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...

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

hide list items that value equals 0

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

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

hide list items that value equals 0

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

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

hide list items that value equals 0

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...

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

hide list items that value equals 0

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

Return to “Issues”