The customer I’m building the app for wants a single locator that can locate on both fields. He wants to be able to type the string, with or without the dashes, to find a record.
I have never attempted such a locator.
Has anyone got some tips or advise on how to proceed?
If both fields have the same data - just cleanup his search value to be without dashes and use that key and that search filter == SomeStringTwo = searchvaluew/oDashes
-or if different values -
In this case the key does not really matter since it could be in either field. Just select a key for display purposes, just make your prop:filter
SomeStringOne = searchvalue or SomeStringTwo = searchvaluew/oDashes
Pretty much all the records need to be searched. I am sure you could do some more elaborate scheme to reduce the reads.
I hit “reply” too soon. SetShadow gives you an opportunity to alter the buffer that gets passed to the locator. So you can either add dashes there, or strip them out.
An alternative I’ve used in SQL is to search on a concatenation of fields. That way if it’s anywhere in those fields you get it.
Not sure that would work all that well in TPS however.