Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

However, if you need to add functionality that is more advanced than what is provided by the plugins, any step can then be written as server-side or client-side JavaScript code. You can mix Code-based steps with No-Code steps at a granular level, without having to work with the entire application as code.

Writing

...

Server-side

...

Code

To write Node.js (server-side JavaScript) code, select the “Write Custom Node.js Code” plugin under the “Custom” category when adding a step.

Image RemovedImage Added

You can use any JavaScript code, including direct calls to any of the pjs API.

...

Code Block
languagejs
globals["property name"]

Writing

...

Client-side

...

Code

To write client-side JavaScript code, select the “Write Client-side Code” plugin under the “Client-side” category when adding a step. If you need to write client-side code for the start of a condition or loop that will encompass other client-side steps, select the “Client-side Loop/Condition Partial”.

If the entire routine is custom code, it may be easier to just write the code directly in the widget event property, rather than creating a routine.

Converting

...

Existing Steps to

...

Code

You can convert any existing low-code step to code by clicking the JS icon on the action dialog.

...

You can then customize the code and save your changes.

Code

...

Analysis

The Profound.js low-code environment will analyze the code you write in order to provide future suggestions for work variables and global properties. Only outer-level declarations will be analyzed. For example, if you write this line of code:

...

Profound.js may start suggesting maxRecords as a value for answers to other low-code plugins.

...

Convert a Routine to Code

In addition to converting individual steps to code, you can also convert an entire routine to code. This is done by clicking the "Switch routine to Node.js code" icon. Client-side steps are not converted as part of this process.

Image Added


When you do this, the routine will have to be maintained manually with code going forward.

Viewing the Entire Program as Code

You can view or export the auto-generated code for the entire application from the Logic tab by clicking on the corresponding toolbar icon.

...