How to ignore hypens while searching in the grid
In the above image, while searching in the grid after removing hypen also below data needs to be come..
Discussion posts and replies are publicly visible
What do you mean with "ignore"?
What result do you expect when searching like this?
You could try to split the search term by the dash symbol and then combine two filters in an AND.
Please help me on this ....Here we getting the result after entering into the the assignment number with hypen like this 6430-860726425, But i need same result without hypen also 6430860726425 .... After not searching or not adding hypen in the search field also result should come .6430860726425 .... After not searching or not adding hypen in the search field also result should come
So you want to see all items that match the term, either with the included hyphen OR without it. Is that correct?
As you did not share any code, I can just guess .... you use some sort of query and some queryfilters.
a!queryFilter( field: "assignment", operator: "in", value: { local!assignmentSearch, cleanwith(local!assignmentSearch, "0123456789") } )
That's just a rough idea and you will have to adapt it to your specific situation.
So you want to see all items that match the term, either with the included hyphen OR without it. Is that correct? - Exactly CorrectCan you please help me to modify the code as i am new to appian a!queryFilter( field: 'recordType!{04d098b2-3248-430f-a8d0-576e6b244ff9}DA Deduction.relationships.{d9dc528a-1952-491e-9b62-d6a4662e662b}daAccountreceivable.fields.{68eecf21-936d-4035-b635-45496164c6b8}assgnmntNmbr', operator: "in", value: local!Assignment, applywhen: and( a!isNotNullOrEmpty(local!Assignment), count(local!Assignment) > 1 ) ), a!queryFilter( field: 'recordType!{04d098b2-3248-430f-a8d0-576e6b244ff9}DA Deduction.relationships.{d9dc528a-1952-491e-9b62-d6a4662e662b}daAccountreceivable.fields.{68eecf21-936d-4035-b635-45496164c6b8}assgnmntNmbr', operator: "includes", value: if(a!isNotNullOrEmpty(local!Assignment[1]),local!Assignment[1], ""), applywhen: and( if(a!isNotNullOrEmpty(local!Assignment[1]), true, false), count(local!Assignment) = 1 ) ),The above 2 query filters are being used for the assignment picture for your reference also..
Then I would suggest a DB view that strips out the hyphens in whatever way you deem appropriate, and your searches can run against that column (for the user-side, you can allow them to enter dashes or not, and pass the stripped-of-hyphens text to the actual search filter, searching against the View Column that also has hyphens stripped).
Beyond that, and we're kinda getting into "magic wand requirements" territory - that is to say, you're expecting the system to do something "intuitive" that it has no logical reason to know to try doing.
Mike Schmitt said:Beyond that, and we're kinda getting into "magic wand requirements" territory - that is to say, you're expecting the system to do something "intuitive" that it has no logical reason to know to try doing.
You made my day! Thanks Mike Schmitt
Stefan Helzle & Mike Schmitt
Can we use custom field here?
I am not sure whether Appian search works on all fields of records or only fields visible in Grid.
Please share your input.
Yogi Patel said:I am not sure whether Appian search works on all fields of records
The screenshots look to me as if they're DIY filters instead of "records filters". If I'm seeing it wrong and they're actually "records filters", then maybe something could be finessed using a custom record field that removes the hyphens, but i'm not overly sure.
Ok. Thanks for the quick reply.
If it's DIY filters with record type, then we can use custom fields. However, if it's a record search (Out Of The Box search), then I'm not sure.
AFAIK it's pretty easy to configure which fields are included in the fuzzy "generic record search" functionality when using recordtype data etc. But I also haven't messed around with it for a while.