Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:Contractor Search Requirement

 
Chris Gastin
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one help me understand this GUI requirement. I have several interpretations, but feed back would be greatly appreciated:

It must allow the user to search the data for all records, or for records, where the name and/or location fields exactly match values specified by the user.
 
Mike Southgate
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO this means:
1) you must be able to start a search that will return all records in the database. This is the same as having no search criteria.
2) you must be able to search both the name and/or location and have the and return all records where they match your criteria.
I created a getSearchCriteria dialog and allowed users to enter the criteria for all of the fields in JTextFields. You could use combo boxes here but that only works for databases of limited size.
The search criteria themselves are stored in an String[] and are compared to the database fields using :
for(int j = 0; j < arrayLength; j++) {
if ((criteria[j] != null)
&& (!(fields[j].toUpperCase()).startsWith(
criteria[j].toUpperCase()))) {
selectRec = false;
}
} //for
ms
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the exact same requirements. I am thinking
of providing three fields they can use
to search (an empty field means search all):
1. A textbox where they can search on any given
string. And when I search I am going to compare
all fields of each record.
2. A combo box or another text field where they
must enter the contractors name. The search looks
only for exact matches and of course only compares
the contractor's name.
3. A combo box or another text field where they
must enter the contractor's location. The search looks only for exact matches and of course only compares the contractor's location.
For number 2 and 3 I can't decide whether to offer a combo box or simply a text field.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't use TextBoxes, I would use JComboBoxes.
Mike your #1 and #2 look accurate.
Mark
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I’m now working on the Contractors assignment v2.3.3. I’ve a similar question posted by Chris.
According to Mike’s reply:
---------
IMO this means:
1) you must be able to start a search that will return all records in the database. This is the same as having no search criteria.
2) you must be able to search both the name and/or location and have the and return all records where they match your criteria.
----------
For point # 1, does that mean…
Say both name and location fields are implemented using JComboxBox. Without any selection from the drop-down list, the fields remain blank for both name and location. When the user presses the Search button, all the records in the db shall be displayed on the screen.
For point # 2, does that mean…
Initially, I thought the user can enter search criteria for all the fields (especially the specialities field) mentioned in the db file, i.e. name, location, specialities, size, rate, owner. But now, it seems like the user can only enter two search criteria, i.e. name and location.
Am I right with the two assumptions made above?
Also, do you think I should display all the records on the screen when the client application first starts up?
Thanks!
Joyce
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joyce,
Point 1: yes, that is one way you could implement it.
Point 2: the instructions can be a bit confusing here. I believe that for the client GUI, you only have two fields you need to search on. But on the server side, you should ensure that the search facility can search on any combination of critera, not just the two specified columns.
do you think I should display all the records on the screen when the client application first starts up?

Design decision time - don't forget to document it.
It can be very nice, and with the few records we have, it is not a huge drain on resources.
But how many records are too many? (quite a lot actually since the records are so small).
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic