Hi all, I am new to rails, and for that matter programming for the web. Scenario: In a Purchase Order screen, I am trying to let a user (Fred) select a customer(General Hospital-MA) and some products. Typically, it can be done using a dropdown list to select from the customers (and products). Our case: We have hundreds of customers, and thousands of products, so the dropdownlist is just not suitable. What is was: In the olden days(I guess I belong there?), there would be a popup that shows CustomerCode and CustomerName and there would be 2 text fields above for the user to put in a few characters (with wildcard). Upon typing "hosp" (or "%hosp%" or "*hosp*") and pressing "find", the selection list would filter the data and show only those filtered records. User then chooses 1 from the much shorter list and it returns to the previous window, populating the other fields. Question: How do I do the equivalent of this in Rails? It doesn''t have to be a popup or have a text field for filtering data or any of the traditional UI practices. It just has to give the user an easy way to select 1 from 1,000 records very quickly. Thanks.
Jesterz wrote:> Hi all, > I am new to rails, and for that matter programming for the web. > Scenario: > In a Purchase Order screen, I am trying to let a user (Fred) select a > customer(General Hospital-MA) and some products. > Typically, it can be done using a dropdown list to select from the > customers (and products). > > Our case: > We have hundreds of customers, and thousands of products, so the > dropdownlist is just not suitable. > > What is was: > In the olden days(I guess I belong there?), there would be a popup > that shows CustomerCode and CustomerName and there would be 2 text > fields above for the user to put in a few characters (with wildcard). > Upon typing "hosp" (or "%hosp%" or "*hosp*") and pressing "find", the > selection list would filter the data and show only those filtered > records. User then chooses 1 from the much shorter list and it > returns to the previous window, populating the other fields. > > Question: > How do I do the equivalent of this in Rails? > It doesn''t have to be a popup or have a text field for filtering data > or any of the traditional UI practices. > It just has to give the user an easy way to select 1 from 1,000 > records very quickly. > > Thanks.Sounds like a simple database query, and you can tack on the ''%'' yourself to make it a bit more inclusive.. You can also take a look at this: http://javathehutt.blogspot.com/2009_06_01_archive.html Absolutely awesome rails plugin for sortable tables, and it has a search box. -- Posted via http://www.ruby-forum.com/.
Hi Aldric, Thanks for the tip. Could you also help guide me on how to make something like this sortable_table work as a selection box that returns a selected customer to the Purchase Order screen? The scenario is that the user is in a Purchase Order screen, creating a purchase order and is going to select a customer (out of 1000) and after selecting, will continue entering the other data related to the purchase order. Thanks.> > Sounds like a simple database query, and you can tack on the ''%'' > yourself to make it a bit more inclusive.. > You can also take a look at this:http://javathehutt.blogspot.com/2009_06_01_archive.html > Absolutely awesome rails plugin for sortable tables, and it has a search > box. > -- > Posted viahttp://www.ruby-forum.com/.