rogierv
Posts: 3
Joined: Wed Aug 19, 2020 8:15 am

Query DB range

Hello everyone

Hope you guys can help me please. I have a SQL connection made with Api Express. Everything works fine. Query from select menu tot filter my databse works perfect but there is one thing i can't get to work.

I need to query my database with a value range so i inserted JS code into the "before send" mapping. The query works perfect, when I only put the "greater then" value inside like this

return { '$gte' : 20200815}; see screenshot "ex1"and "ex2"

But i want to set a range so greater then a value and less then another value so i try to put this code in the same way

return { '$gte' : 20200815, '$lt' : 20200816}; see screenshot "ex3"and "ex4"

When i'm using this code i will get too much results. There are values in my filtered list that are outside of the range. Do i need to change the code?

The next step is to change the "20200815"and "20200816" values into values the query gets from local storage so what would be the code then?

Thank you very much

Attachments
ex4.png
ex4.png (74.24 KiB) Viewed 9902 times
ex2.png
ex2.png (97.6 KiB) Viewed 9902 times
ex1.png
ex1.png (102.01 KiB) Viewed 9902 times

Return to “Issues”