Example:
I have a list of numbers, from 0 to 99999999
I want to do something like we do in SQL with LIKE and % char.
If I write 99%99, I filter all values starting with 99 and finishing with 99, with any combination in the middle. Now, What I need is this same idea but using a dot (.) instead of %.
No sense to filter anything in a lookupField. I think you mean you want to select a certain item from lookupField entering an expression.using a wildcard to be replaced by some calculated string, i.e. “.” to other string
I made it with this WA
@Inject
LookupField lookupFieldSomething;
@Override
public void ready(){
lookupFieldSomething.setNewOptionAllowed(true);
lookupFieldSomething.setNewOptionHandler(new LookupField.NewOptionHandler() {
@Override
public void addNewOption(String caption) {
if (caption.contains(".")) {
MyObject myObject=searchMyObject(caption); //here you will format caption and get myObject, if exists
lookupFieldSomething.setValue(myObject);
}
}
});
}