Highlighted

How to add prefix to entere value?

Avatar

Avatar

aka44356106

Avatar

aka44356106

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

Highlighted

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_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

Avatar

Avatar

aka44356106

Avatar

aka44356106

aka44356106

30-09-2019

any other way to add a prefix in a textfield at runtime.

Highlighted

Avatar

Avatar

aka44356106

Avatar

aka44356106

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

Avatar

Avatar

radzmar

MVP

Total Posts

2.6K

Likes

386

Correct Answer

485

Avatar

radzmar

MVP

Total Posts

2.6K

Likes

386

Correct Answer

485
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

Avatar

Avatar

aka44356106

Avatar

aka44356106

aka44356106

02-10-2019

working fine thanks

Highlighted

Avatar

Avatar

aka44356106

Avatar

aka44356106

aka44356106

02-10-2019

any short script for this dispaly pattern

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

Highlighted

Avatar

Avatar

radzmar

MVP

Total Posts

2.6K

Likes

386

Correct Answer

485

Avatar

radzmar

MVP

Total Posts

2.6K

Likes

386

Correct Answer

485
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: '}";

}