RunJsFunction

Stable Version 1.0.1 (OutSystems 11)
Published on 07 November 2019 by 
Created on 07 November 2019
Details
The RunJsFunction lets you run javascript on the serverside. There is no need to install anything on your server like NodeJs or a webbrowser. It uses the Jint engine (.net library) to perform javascript operations.
Read More

How it works:

There are 2 input parameters to this extension. “input” and “script”. Both should be as a plain string but “input” can be Json formatted. The result should be:

Input:
{
  "amount" : "3",
  "price" : "4"
}
Script:
input = JSON.parse(input);
input.total = (input.amount * input.price).toString();
input = JSON.stringify(input, null, "\t");
Output:
{
                "amount": "3",
                "price": "4",
                "total": "12"
}

 

Practical usages:

Although almost all logic can be performed by coding in OutSystems. This tool lets you create logic without the need to build and release. Scripts can be saved and retrieved from the database so that would be the only logic you need to build in OutSystems.

We currently use it to map one Json object to another. When working with a lot of structures this tool makes life a little easyer.

Implementation:

The RunJsFunction Editor will soon be available on the forge using CoreMirror as an IDE to write your scripts.

Resources:

https://archive.codeplex.com/?p=jint

What’s new (1.0.1)

edited a typo

Reviews (0)
Category
Applications, Connectors, Data Connector, Developer Tools
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Danny Prager who created this component.
Dependencies
RunJsFunction has no dependencies.
Requirements
Platform:
11.0.0.200
Database:
All
Stack:
.NET
Component Consumers
No consumers yet.
Weekly Downloads