Esko Logo Back to Esko Support
Choose your language for a machine translation:
Skip to end of metadata
Go to start of metadata

 

Question

Are there any examples available for the Execute JavaScript workflow node in WebCenter?

Answer

Examples

Setting the first 6 characters of a project attribute in another project attribute
var project = API.getProject();
// Get the source attribute
var attributeSource = project.getAttribute(“ArtFileName”);
// Get the value of the source attribute
var attributeSourceValue = attributeSource.getValue();
// Calculate the new value
var newValue = attributeSourceValue.substring(0, 6);
// Get the target attribute
var attributeTarget = project.getAttribute(“ItemNumber”);
// Set the new value in the target attribute
attributeTarget.setValue(newValue);

Documentation

  • Documentation of the workflow node can be found here.
  • The API of the JavaScript workflow node in HTML format can be found here.
  • The API of the JavaScript workflow node in PDF format for WebCenter 16.1 and WebCenter 16.1.1 can be found here: WebCenter16.1.1_JavaScriptAPI.pdf

The API of the JavaScript workflow node is slightly different than the one for JavaScript buttons in an attribute category.

Article information
Applies to

WebCenter 16.1 and newer

Created30-Nov-17
Last revised 
AuthorBAMT
Case Number 
Contents