How to change table data with select box

Hi everyone, long time follower with such a great members and first time posting and need help.
I am trying to have form or data that is going to change the data in table by filtering data from select box from static combo box. for example show only data for last 90days or 180days.

Thank you in advance.

I tested and enter manually the -90 {{NOW.dateAdd(“days”, -90)}} and it works.

But How I am going to pass the Select box value into function. I know this might be basic question for most of you guys. I am in learning process.


Use the $_POSTed value as in

The query will be

Hi Ben,

I changed the form to post.
I added the POST variable
I changed the table condition

No result is coming out

I am sure I am missing something.

Thank you,

If this is working then you will want to replace the 90 with the value from your form.

Something similar to this.

{{NOW.dateAdd(“days”, -$_POST.elapsed)}}

I tried that. But it didn’t work.

After the page loads. the default select box shows 90 which is the first item in selectbox, and it suppose and then we should be able to change it to 120 or any other and it should change query. But nothing happened.

I am not sure what I am missing here.

Thank you

I believe you want to check this tutorial:

It works the same for select inputs i.e. you need a GET variable and use it in the query builder with the condition you need :slight_smile:
POST variables are only used when you are dealing with submitting forms.

1 Like

Hi Teodor,

THANK YOU SO MUCH. it worked out perfect in 5 min.

Now I have to challenge on my next challenge as far as showing how many items per page.

In order to set a number shown per page, you need to use a Paged Query. You can do it the same way, using a GET variable.