Search in Datatable so that I can search Column starts from specific alphabet by excluding prefixes?
Search in Datatable so that I can search Column starts from specific alphabet by excluding prefixes?
pankajomsahu
Posts: 5Questions: 2Answers: 0
If I Click on T, I want only those records which which have suffixes 'The', 'The Uttar Pradesh' and just after the word which is starting from T or the word starting from T itself and it is not 'The', 'The Uttar Pradesh'.
This question has an accepted answers - jump to answer
Answers
How are you performing the search at the moment? Our alphabet search plug-in does what you are looking for.
Allan
I think the op is talking about skipping leading articles in text.
I have a lot of titles in my data, and my solution is to store leading articles in a separate column and concatenate them back for displaying. Initially more complex, and not for everyone, but makes search and sort more logical.
Thank You @tangerine for showing interest here.
But Simple Alphabet Sorting is working. I'm looking for my specific case if you understand.Please go through the image you will understand what I'm actually looking for. The three results are underlined by ignoring prefixes like 'THE', 'THE UTTAR PRADESH' & 'UTTAR PRADESH'. There will be a In Image I'm performing operation on 'T' alphabet. There will be one another result which will display All records starting with 'T' AND do not have prefixes mentioned above.
I think we need to go back to my question then. How are you performing that search since the plug-in I linked to is performing the way you describe. So I guess you've got some other implementation.
Allan
@allan I just want to ignore some words in the start of string while performing search.
I don't really like repeating myself three times, but you haven't answered my question:
Allan
If I understand correctly you want to ignore leading words like
The
. Assuming you are using the alphabet search plugin Allan linked to you can change the search pluglin to remove these leading words before doing the compare. The he search plugin looks like this:Lines 7-9 perform the comparison. You can use a regex expression to remove the leading words like
The
then use that result for the if statement. Maybe something like this:Haven't tested this but it should be close I will leave it to you to test this solution.
Kevin
thank you @kthorngren ...