Reference an External JavaScript File

◷ Reading Time: 2 minutes

In Natural Language, you can reference an external JavaScript file and use the functions there.

  • Create the JavaScript function that needs to be referenced in the Natural Language file.
  • Created JS function should be used in your Natural Language document with the same function name
  • The same function name should be referenced in the document under Type Definition.
    • Is Function: True
    • Name: <Name of the function>
  • Click on JS Testbed and add your .js file.
  • It also requires selecting the option, Include External JavaScript Sources.
  • Once you see the .js file in the list, click Launch.
  • Your logics in Natural Language will be launched in the JS Testbed as follows.
  • You can select which logic to run and enter the input data.
  • The logic will run in the JS Testbed and you will see the results as follows.

Download Project

The project explained in the above example can be downloaded from the link at the end of the page.

Updated on July 16, 2021

Article Attachments

Was this article helpful?

Related Articles