Singleline String, Set Nth Line of Multiline
Extracts one line of a multi-line string and sets that line in single-line String-type Data Item. The Line ID mut be an integer starting with zero. If the Line ID is not specified, or if a number outside the range is specified, the last line will be extracted.
Download
- singleline-string-set-n-th-line-of-multiline-2021.xml
- 2021-11-29 (C) Questetra, Inc. (MIT License)
- singleline-string-set-n-th-line-of-multiline-2023.xml
- 2023-08-28 (C) Questetra, Inc. (MIT License)
- for “GraalJS standard (engine-type 3)” on v15.0 or above
The Add-on import feature is available with Professional edition.
Freely modifiable JavaScript (ECMAScript) code. No warranty of any kind.
Notes
- When the process reaches the automated task, the Nth line in the multiline string is extracted.
- The Line ID
N
should be an integer starting from zero. - If you want to extract the first line, specify “
0
“.
- The Line ID
Capture


Appendix
- If the Line ID contains commas they will be removed and then parsed.
- Parsing depends on JavaScript
parseInt()
.
- Parsing depends on JavaScript
- If a line with only line breaks is specified the single line data will be overwritten with an empty string.