Question

I have several objects with the following naming conventions.

a. "Purchase Order 1"
b. "Purchase Order 2" 
c. "Purchase Order 3"
d. " Purchase Order 4" (space at the start)
e. "Purchase Order 5 " (space at the end)
f. "Purchase Order 10"
g. "Purchase Order 11"
h. "Purchase Order  12"
i. "Purchase Order13"
  1. Search by "Order" should list everything
  2. Does it make sense to allow "5 " or " P" or should I strip them before searching.
  3. I need to search for all orders starting with " 1". So that I can avoid Order13.

How should the user interface handle space as input (especially in the beginning, end). Need inputs.

Was it helpful?

Solution

Your objects should have a field indicating order number.

If that is not possible and all you've got is a text field then you'll have to apply trimming to user input when it's transferred to back-end.

Also trim should be applied to text values in your storage. Then you invent some matching mechanism. This mechanism will depend on the technology that you use to access your data, if it is a database then some LIKE SQL statement.

OTHER TIPS

If they are all POs, perhaps the user only needs to enter the number. Perhaps a drop down or picker so they don't even need to type.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top