Page 1 of 1

Algorithm

Posted: Thu Dec 12, 2013 5:25 am
by Ashok

Hello everyone....
I have am trying to achieve a search type of implementation on my project.
the layout is like the below

Image

i am facing a problem in which i am storing some information on the parse database....and when i type in the values in the input box i need it to give me a drop down containing the items in that particular database..like this...
Image

can i achieve this in appery... ??? I will give a invoke service(GET SERVICE) on value change of that input box to validate it when entering the info to be searched ....Pls Do help me....


Algorithm

Posted: Thu Dec 12, 2013 6:16 am
by maxkatz

Yes, you can build such app. In Appery.io you create HTML5 and PhoneGap mobile apps. So, you are only limited by what the browser supports. Yes, you would invoke the service to get the list of suggested items based on entered input. The actual popup that shows the suggested list -- it has to be coded by you.


Algorithm

Posted: Thu Dec 12, 2013 7:08 am
by Ashok

THank you
I implemented the code
return '{"Address":{"$regex":"^'+value+'", "$options":"i"}}';
but what i am suggesting is suppose i have a list which searches an address of a particular place....
The above command oly lists the elements whose letter starts with ie No.34 Old Parks Road....
Usually a person when he types in he will not know the No. 34.... so i want the search to work in such a way that not oly the starting elements i want it to search the middle and last element too! how can i alter the above code in such a way that it searches the middle elements too


Algorithm

Posted: Thu Dec 12, 2013 7:21 am
by maxkatz

You mentioned you are using Parse. I think Parse also supports using regular expressions to do searching so you can try doing that.


Algorithm

Posted: Thu Dec 12, 2013 7:36 am
by Ashok

i dont think so they do.... i searched the docs every where pls do let me know if u find a link.... and yup pls help me out with the algortihm if you can


Algorithm

Posted: Thu Dec 12, 2013 7:45 am
by maxkatz

If the backend you are using (Parse) doesn't support this -- there is little you or we can do. You need this functionality on the server side.