DMXzone App Connect Support Product Page

Filtering a Query With Text Input

Asked 17 Feb 2017 03:38:45
1
has this question
17 Feb 2017 03:38:45 Charles cruise posted:
I started playing around with App Connect and have a couple of questions. I started out by duplicating the design showcased in Data Grind with Export. I created an action file as shown in the database do to a filtered query that connects to my test database. There is currently only 2 items in the table.

I used used the text input in the form to do the binding. Once everything is created, I do a preview without any items listed and it displays the information for the 1st item in my database is the first 2 rows. If I start to type in the description for the second item in my database, it shows only that item in the first row. Did I mess something up in trying to implement this into a form instead of a plain text box like in the demo?

Thank you in advance for any assistance.
Charles

Replies

Replied 17 Feb 2017 07:50:47
17 Feb 2017 07:50:47 Teodor Kuduschiev replied:
Hello Charles,
From your explanation it is not very clear what exactly is wrong on your page. I'd recommend you to follow the video tutorial, which is very detailed and explains how to do it step by step: www.dmxzone.com/go/32768/filtering-a-query-with-text-input/
Replied 17 Feb 2017 12:55:18
17 Feb 2017 12:55:18 Charles cruise replied:
Theodor,

Thank you for your reply. I followed the video tutorial except except for one slight deviation. Instead of using a simple text box, i used a form input box. Eventually, I will want to search database and filter table results by product categories and such.

When the page loads, and the input box is empty, shouldn't it display all records in the database? Then after entering in text in the input box, it filters and just display the items that has that text? When my page loads, it displays the first record in the database twice.

While going through the video tutorial, when I came to the section to insert bindings, in the DMXzone App Connect - Data Bindings Pickup window, the Repeat:repeat1 does not have an arrow saying it can be expanded to select the binding. I ended up going to server connect: serverconnect1, data, query, and then selecting the field.

Could I be having problems, due to using an input box inside a form instead of just a plain input box?

I created a new page and got rid of the form at the top and put in just a plain input box like video shown. When I went to insert bindings, i was able to expand the repeat1 properties and select an item to bind.

So my question is, will this only work for simple input boxes not inside a form? To view the results you can go to jaycorvparts.criasdesigns.com/admin/index.html for the page that is using an input box inside a form. To view results following video without any deviations, you can go to jaycorvparts.criasdesigns.com/admin/index2.html

Thanks again in advance for any assistance.
Replied 17 Feb 2017 13:07:50
17 Feb 2017 13:07:50 Teodor Kuduschiev replied:
Hello Charles,
It does not matter if your text field is wrapped in form or not. But in this case you do not really need a form tag around the field(s).
In order to show all the records when nothing is typed in the text field, you just need to make sure the condition field in the query filter is filled with the same value, you used as a filter value, which means - the filter will only be applied when there is a value:


On this page: jaycorvparts.criasdesigns.com/admin/index2.html i do not see anything wrong actually.

Reply to this topic