Item Preprocessing with JavaScript

Video Lecture

Item Preprocessing with JavaScript Item Preprocessing with JavaScript Item Preprocessing with JavaScript

Description

This is the script used in the item preprocessor

1
2
3
4
5
6
7
8
9
var lines = value.split("\n");
var lineZero = lines[0];
var accountName = "";
lines.forEach(function(line) {
  if (line.trim().substring(0, 13) === "Account Name:") {
    accountName = line.substring(14).trim();
  }
});
return accountName + " : " + lineZero;

Item value preprocessing