Search Support
-
RameshkumarSeptember 11, 2015 at 12:46 pm #744
Team,
I have a requirement to search the values with in the table as per the attached screenshot. I see the configuration called ‘search’ in the table control, but not sure how to use it.
I would like to search by first name, last name, identifier (referring to the attachment). Could you please let me know, how I can achieve that ?
Regards,
Ramesh
jmacSeptember 16, 2015 at 12:20 pm #747I don’t see an attachment, but I think I can explain to you how to do this. If you look at the table search method it has the following:
search(col, exp, caseInsensitive, useRegex)
You indicate that you want to search by columns “first name”, “last name” and identifier. If these are col indexes 0, 1, 2 respectively, and you want to find rows with a first name of “John” your search would look like this searchCtl.search(0,”John”,false, false). This indicates that you want to search the first name columns for all occurrences of “John”, spelled exactly like shown (first false), and the expression specified is NOT a regular expression (second false).Hope this helps
Good Luck
JMAC
RameshkumarSeptember 21, 2015 at 12:01 pm #752Hi Jmac,
Please find the attachment for the details. I am facing below issues
1. Could not able to search with multiple columns
2. if I remove the search criteria, the table becomes empty
Please let me know, how we can address above points. Please see the document for more in details.
RameshkumarSeptember 22, 2015 at 1:37 pm #755Team,
Could anyone look into it and update me the feasibility.
Regards,
RameshjmacSeptember 23, 2015 at 7:04 am #756Ramesh:
The issue is being caused by the Table2.search method you have specified in the On Change of your SearchText field. You have a hard coded column index for the search (column 3 which is Last Name). You need to allow a means to specify the search column in your UI. I would probably use a single select with the Name value set to the Table column name, and the Value value set to the index of that column. You would also need to add a Search Button to control the search (i.e. you could no longer use the On Change of the Search Text field). Assuming you call your Single Select “SearchColumn” you could then set the On Click of your Search button to be the following:
${Table2}.search(${SearchColumn).getSelectedItem(),${SearchText}.getText(),true,false);
Note: This assumes the control ID of the Search Text Field is SearchText, and the control ID of the Single Select field is SearchColumn.
Hope this helps
JMAC
RameshkumarSeptember 25, 2015 at 11:59 am #760Thank you for the update JMac. I am able to achieve it through your work around, but still I am not sure how to get the original result back.
Lets say, if I choose last name as ‘SAAD’, it gives me 3 results. But when I remove ‘SAAD’ from search text, it should bring back original 100 records.
How do I achieve that ?
Regards,
RameshjmacSeptember 26, 2015 at 5:39 am #761Ramesh:
I don’t currently have access to a system to try this, but I think if you specify null for the search text that should do it. In other words if no Search Column is specified, specify null for the search text, my suspicion is that you specified a zero length string (i.e. “”). I can’t check this out until sometime on Monday.
JMAC
RameshkumarOctober 27, 2015 at 2:29 pm #843Team,
I am getting an error while using ‘clearSearch’ method to remove the search criteria. Could you please let me know, is it a bug in the toolkit ?
I have used this below method, on click of the button
Please find an attachment.
clearSearch();
jmacOctober 28, 2015 at 10:34 am #846Ramesh:
I am able to successfully use this method… perhaps you have a syntax error in your script.
If you cannot spot the error, please give me more information and I will have a look. Maybe you can attach a small twx file that shows the error.
Regards
JMAC
-
|
You must be logged in to reply to this topic.