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

Filter Response

Hello

My database response looks like this

Code: Select all

      "_id":"54f0d947e4b078e6433f", 
     "f1":Smith Inc, 
     "f3":5.0, 
     "f2":0.0, 
     "f5":6.0, 
     "f4":0.0, 

     "_id":"54f0d947e4b0783f", 
     "f1":IBM Inc, 
     "f3":0.0, 
     "f2":2.0, 
     "f5":0.0, 
     "f4":1.0, 

I don't want to return the columns f2,f3,f4,f5 that have the value of 0.0.
or
I want the the columns f2,f3,f4,f5 that have a value of 0.0 to be discarded.

Im trying to pass the columns with values greater then 0.0 into a list. I know I can hide the values using element.hide(); but that doesn't really do what i want.

Any ideas?

Thank You
Vinny

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Filter Response

Hello,

You will need to create query to retrieve only needed columns, find more here https://devcenter.appery.io/documenta...

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

Filter Response

I need all the columns just remove the fields that have zero. can u be more specific like what query tp use. Is the nor my best option.

Im my example I need column f2 becauw it has a value of 2.0 but I dont kneed it for the other cause it has a value of 0.0

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Filter Response

Hi Vinny,

Nope, you can not remove fields from response in accordance to their values.

If you need (but i don't understand why) you can implement it with server code and custom logic to iterate through all items and delete needed fields. Then return it.

Please read more about server code here: https://devcenter.appery.io/documenta...

Regards.

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

Filter Response

Thank you.

I am trying to use sendgrid to send data from a list.

I have the following code in the text filed in sendgrid.

var grid = Apperyio("mobilelist_f1");
var em = grid.text();
return em.replace(/\s*$[\n\r]{1,}/gm, '');

the list has 110 items in it.

The email will not go through if I try to send more then 63 items.

I limit the amount of responses from the database query to 63 and the email works.

If i set the limit to 65 from the database the e-mail will not work. I am using the sendgrid api and the only code i am using is the above code. I would use server side code but i have NO IDEA how to do that.

so this is my error ( 414 Request-URI Too Large )

any suggestion on why the emails are not going through when the database response limit is over 65?

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

Filter Response

Vinny,

I'd suggest you follow this thread.... as I had a similar problem with sending large emails --- this will definitely get you past it....

https://getsatisfaction.com/apperyio/...

Best,

Bruce

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

Filter Response

I appreciate the help bruce but that topic is all over the place and I am having trouble following it.

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

Filter Response

Follow from this post .. Down ... You need to set up a 'post' service as Yurii describes. If you can't follow the post after reading ... Let me know. Image

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

Filter Response

Be sure to read the two or three posts immediately after the one I screenshot above ... He corrects one of the instructions given in the post I took a screenshot of above.

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

Filter Response

ok i am trying again. Appreciate your help.

not sure where to put the code.

do I put it on a button on click event?

Return to “Issues”