Import & Export Scripting Rules

13 "script" : "/* 1. Input variables Input body is set in input variable */ let a = input.value1; let b = input.value2; /* 2. Define simple \"multiply\" function */ function multiply(a, b) { return a * b; } /* 3. Execute multiply function and store value result variable */ let resultMultiply = multiply(a, b); /* 4. Set output model which is returned in REST API */ output.result = resultMultiply; /* Optionally: It is possible print values to console */ console.log('Result multiply:', resultMultiply); /* 5. Return output */ return output;"
Was this article helpful?

Still puzzling over something?

The agent has read this article — and everything around it. Ask a follow-up and it answers in seconds.