Page 1 of 1

List view data filter mapping

Posted: Fri Oct 18, 2013 6:36 pm
by Adam Garbinski

Hello,
Can you give me some clues on how to create proper data mapping in case of list view component? I need to use "Data filter" option. Once I enable this option the search box is visible but I do not know how to map its value to database request. In fact there is only one child element named "visible". There are child elements underneath but they belong to list item object. So I have no idea how to connect user search input with database request on the mapping diagram.
Image


List view data filter mapping

Posted: Fri Oct 18, 2013 7:17 pm
by Maryna Brodina

Hello! What do you want to transmit to where parameter? In fact you can't do that using mapping only. In mapping to where parameter you should add JS where you retrieve necessary data and form it the way you need. Just mapping won't work.


List view data filter mapping

Posted: Fri Oct 18, 2013 7:36 pm
by Adam Garbinski

I understand that but you need to obtain user input. I simply do not see to what element should i make reference, since the object tree does not have any "text" item from which I could retrieve value entered in search box by the user.


List view data filter mapping

Posted: Fri Oct 18, 2013 7:56 pm
by Maryna Brodina

Try this code
preAppery("mobilelistName").prev().find("input").val();/pre


List view data filter mapping

Posted: Fri Oct 18, 2013 8:03 pm
by Adam Garbinski

Thanks! I'll try and give the feedback.


List view data filter mapping

Posted: Sat Oct 19, 2013 12:59 pm
by Adam Garbinski

It works fine. So thanks for help.
Meanwhile I have realized that using Data filter is not a good option in my case. Using Searchbox and pure Item list was much simpler.