Make sure an integer is required to be 9 numbers long

0
Hello, In my mendix model I want to add a function to make sure an integer is required to be 9 numbers. How can I add this feature?
asked
5 answers
1

Hi Sten,

 

Take a look at the following function from mendix that you can use in an exclusive split in a microflow: https://docs.mendix.com/refguide/string-function-calls#length

answered
1

Pretty sure using an integer is not the correct way to model this. This should probably be a String.

Use a regex match. Something like isMatch($foobar, '[0-9]{9}')

answered
1

Thanks, it works!

answered
0

It is not working for me yet. When I run the app, it always says I don't have 9 numbers. Underneath is a printscreen of the microflow I used. Is there a mistake in the microflow? 

answered
0

The expression in the exclusive split is     length('$Patient/BSN')=9

answered