Check if text field begins with a range of letters

Comments

1 comment

  • Paul Renshaw

    e.g. for first letter in a-m:

     

    var range = "abcdefghijklm";

    if ( range.indexOf(@fieldname.substr(0,1)) > -1 ) {

        var result = @fieldname

    } else {

        result = ""

    }

    result

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk