Skip to main content

Using a domain with the NVARCHAR datatype and length 10, I was hoping the GUI would already check for the need of having at least 10 character, but unfortunately it does not and only limits it as a maximum. Seeing the input constraint, it seems to be a solution to some requirements I would like to apply to the domain as an input field (GUI).

I am a bit confused about the “Regular expression” vs the “SQL expression”. It seems the SQL expression does not support the immediate timing option, so to use one or the other the expression values are of course not the same.

Limit 10 characters
The limitation of 10 characters I got working with the SQL expression LEN({domainname} = 10, but lets say I want this in the regular expression version, what do I use as a value there?

Limit to certain character values
Also I wish to limit the input values to certain characters, so a regex seemed a likely solution. Looking for the regular expression as for this input it would be nice to be able to set it to immediate if possible.

Unable to cancel on constraint trigger?
Lastly, is it intended to be unable to cancel when you had a input constraint trigger? In my example I had a task with one parameter to test the length requirement and it did trigger when needed, but I was unable to cancel my task until I emptied the field or changed it to a valid length.

Hi Mark,

For the Regular expression part, the regex for needing to have exaclty 10 characters is as follows:

 ^.{10}$

Explanation of the regex

I can recommend using regex101: build, test, and debug regex to create and test regular expression. Also AI chatbots like ChatGPT can help creating these. If you want to only allow letters, you can change the regex to be:

^gA-Z]{10}$

Tests

I would expect you to be able to cancel the Task even if the constaint is not satisfied, feel free to create a ticket for that.


@Mark Jongeling Thank you for your quick response. It clicked now that Regular Expression = RegEx. Now it makes more sense what my options are for the Input constraints. 😅

For the inability to cancel when a constraint triggers, I will create a TCP ticket.