Hi ,
When i give my item no:8415-00-051-1173 in search bar it displays item details of that particular product.
But i need to get same results when i give without hypens i.e 8415000511173 .
Can anyone guide me to get this result
Thanks,
Jasmine
Printable View
Hi ,
When i give my item no:8415-00-051-1173 in search bar it displays item details of that particular product.
But i need to get same results when i give without hypens i.e 8415000511173 .
Can anyone guide me to get this result
Thanks,
Jasmine
How is your data stored?
How do you do your search?
It is stored as VARCHAR2.
We have a search bar
Attachment 3538
I have attached my web page ,where i do search for a partno in the search bar.
Do you have any idea ,how can we determine whether a partno consists of a hyphen.
For ex.
if(partNum.consistsOf("-")
By "how do you do your search" I mean the code.
Also, by "how is the data stored" I mean, is it the hyphenated version (presumably yes)?
For search...i have a .jsp file
Here is the code.
String keywords1 = "";
String category = "-200" ; // default for All Products
String keywords = Utility.nonNullify(request.getParameter("kw"));
if (IBE_logEnabled)
IBEUtil.log("ibeCSrdSrchResults.jsp" , "kw = " + keywords );
keywords1 = IBEUtil.htmlEncode(keywords);
if (IBE_logEnabled)
IBEUtil.log("ibeCSrdSrchResults.jsp" , "keywords = " + keywords1 );
String operator = Utility.nonNullify(request.getParameter("bo"));
category = Utility.nonNullify(request.getParameter("cg"));
String notKeywords = Utility.nonNullify(request.getParameter("nkw"));
//String dispStart = Utility.nonNullify(request.getParameter("ds"));
String dispRange = Utility.nonNullify(request.getParameter("dr"));
String categsPerPage = Utility.nonNullify(request.getParameter("cpg"));
String itemsPerCateg = Utility.nonNullify(request.getParameter("icpg"));
String searchType = Utility.nonNullify(request.getParameter("st"));
String partNum = Utility.nonNullify(request.getParameter("partNum") );
oraclepreparedstatement = (OraclePreparedStatement)oracleconnection.prepareS tatement("select element_name, element_value "
+ " from mtl_descr_element_values where inventory_item_id = (select inventory_item_id from "
+ "mtl_system_items_b where segment1 = :1 and organization_id = :2) and element_name = 'Item Image File Override'");
java.math.BigDecimal oi = RequestCtx.getOrganizationId();
int orgid = oi.intValue();
String kws1 = request.getParameter("kw");
String first11 = kws1.substring(0, 4);
String second11 = kws1.substring(5, 7);
String third11 = kws1.substring(8, 11);
String fourth11 = kws1.substring(12, 16);
String final11 = first11;
// oraclepreparedstatement.setString(1, ioin);
oraclepreparedstatement.setString(1, final11);
oraclepreparedstatement.setInt(2, orgid);
oracleresultset = (OracleResultSet)oraclepreparedstatement.executeQu ery();
------------------------------------------------------------------------------------------------
kw is the keyword field which we give in the search bar.
I have taken this keyword and took the partno without hypens using substring method and stored in a variable.
Can you guide me later how i need to proceed
Cross posted
Regd:Keyword search (JSP forum at JavaRanch)
db
And reading that crosspost highlights why notifying us of it is important...as we have two threads aessentially saying the same thing!