Hi Everyone!
I'm trying to create a constraint attribute rule that limits the types of characters in a field, I've tried using the find() function which returns -1 in case the character is not found within the typed text. This workflow works perfect when I only search for one character/word, unfortunately I need to limit the field to certain specific characters regardless of their order , length or if they are repeated within the text string (eg A, B, C. and no matter if the field contains AA, ACB, BAC, BBAC). I tried using find() in conjunction with the operator || but i failed miserably 😂😂
So here´s the piece of code I tried to use:
var test
test= find(('A'||'B'||'C'),$feature.name)
if (test>=0) {
return true;
}
else {
return false;
}
I appreciate so much your comments/suggestions.
Thank you all!