How to use Regular Expression(Regex) in Biztalk Schemas

Hi, many time we face such a scenario that we need to set restriction to our schemas message before it passes to the BTS.

For Example : I am having an Schema “Address” and there is an elemet “PIN”. Now i have to set a restriction on this element that only numeric(digits) can be set to to this element of length 6……

this is a very usual but quite tricky and simple ..

Using Regular Expressions
1) Select the element for which the validation is to be done.
2) Set the ‘Derived By’ property to ‘Restriction’.
3) Type the regular expression(s) in the ‘Pattern’ property.

Thats it . Now validate your message by putting some thing like “123asd”in PIN element , it will not accept it .

Easy enought 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s