Highlighted

How to add prefix to entere value?

aka44356106

29-09-2019

Sir

in textfield display pattern any way to add a prefix in textfield

i try it

text{'Name' AAAAAAAAAAAAAAAAAA}

BUT when name in two words (e.g. Michal Shumakar) its not worked.

Replies

_Bruce_Robertson

MVP

29-09-2019

The 'A' symbol will match alphabetic characters, which the space character is not.

You could try text{'Name ' XXXXXXXXXXXXXXX} which will work for "Michal Shumakar", 'X' matches any character, but will only match a 14 character value.

You probably want to try doing this in code.

Highlighted

aka44356106

30-09-2019

WHEN I select email alphanumeric pattern  

its work fine when less than 14 characters text{OOOOOOOOOOOOOO'@example.com'}

but not working in case of   text{'Name ' XXXXXXXXXXXXXXX}

Highlighted

radzmar

MVP

01-10-2019

You can create the pattern depending on the length of the input string dynamically.

Add this script to the fields exit event:

if (!this.isNull) {

    this.format.picture.value = "text{'Name '" + new Array(this.rawValue.length + 1).join("X") + "}";

}

Highlighted

aka44356106

02-10-2019

any short script for this dispaly pattern

null{'Name :'}|text{'Name : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' '}

Highlighted

radzmar

MVP

02-10-2019

It's almost the same:

if (!this.isNull) {

    this.format.picture.value = "text{'Name: '" + new Array(this.rawValue.length + 1).join("X") + "}";

} else {

    this.format.picture.value = "null{'Name: '}";

}