How i access via script a single element from a textfield defined as Comb Of Characters?

Avatar

Avatar

m_tavares

Avatar

m_tavares

m_tavares

11-01-2018

How i access via script a single element from a textfield defined as Comb Of Characters?

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

12-01-2018

You have to select JavaScript as language in the script editor!

Avatar

Avatar

m_tavares

Avatar

m_tavares

m_tavares

12-01-2018

hi, thanks for answer, but didn't work! I got a errorCapturar.PNG

this the code:

var teste = Campotexto3.rawValue.charAt(2)

$host.messageBox(teste)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

11-01-2018

You can use the charAt() method which returns a characters at the defined index position (index is 0-based).

var singleChar = Textfield.rawValue.charAt(2); // returns the 3rd character