Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Min length

KAN5
Tera Contributor

Dear community,

 

We know there is a max_length attribute for Reference type catalog variables. But how can we realize a min length for the autocomplete search? We would like to achieve that the search only starts when at least three characters got entered into the field.

Any ideas?

Best regards

1 REPLY 1

ShubhamGarg
Kilo Sage

Hello @KAN5 ,

Regular Expression (RegEx) would be the best solution to your problem statement.

Open variable record -> "Type specifications" section -> Select appropriate Validation Regex from drop-down list -> Save it.

In case, RegEx is not present in drop-down. Create new Validation Regex following this path: Service catalog > Variable Validation Regex > Create New.

 

My previous solutions for reference -

Solved: Re: Validation for number for variable in Catalog ... - ServiceNow Community

Solved: Validation for number for variable in Catalog item 

 

If my response helps you in any way, kindly mark this as Accepted Solution/Helpful and help in closing this thread.

Regards,

Shubham