Hi All,
Hope you are okay and well.
I have a query on setting boundaries via script.
I have this modified script for my sample data file. What I do is extract the two fields PersonName and PersonId clean the latter field then create a setVariable for a new name for the field lastPersonName.
The hard part is I want to make it the same as making it a trigger on change of LastPersonName, but I don’t know how to do this. Are you able to advice what I can do to achieve this?
var PersonName = boundaries.get(region.createRegion("PersonName"));
logger.info(PersonName);
var linkedTo = boundaries.get(region.createRegion("PersonId"));
logger.info(linkedTo);
var newPersonName = `${PersonName[0]} - ${linkedTo[0]}`;
logger.info("newPersonName: " + newPersonName);
if (boundaries.getVariable("lastPersonName") !== null) {
if (newPersonName !== boundaries.getVariable("lastPersonName")) {
boundaries.set();
}
}
boundaries.setVariable("lastPersonName", newPersonName);
