Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about criteriaFind metod

 
Sam Stackly
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
In my instruction, the paramater for criteriaFind is a string which should contain Carrier and Origin, for example "Carrier='SpeedyAir',Origin='SFO'" ,now question is :Can I add Destination Flied ( that makes more sense to book a flight) in my string ??
Thanks
 
Charles Miller
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I allow filtering on any combination of the field names. My filter dialog gets a list of the valid field names and creates a dialog (grid) with the names of the fields on the left and an entry field on the right. On exit, a collection is created that has the field names as keys and the filtering criteria as the value (only fields with data entered are included). A helper method converts the collection to a string and passes that to the criteriaFind() method.
 
Mike Piotrowski
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,
My criteriaFind method was a generic search method. It takes any combination of name=value pairs, not just specific to FBN. This way it can be used for any database that the Data class can read. In my GUI, I enabled the user to search by either Destination, Origin or Carrier.
Mike
 
Sam Stackly
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guys for reply ,
Creating a generic method like Mike mentioned is the point I was looking for. Thanks again.
Sam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic