Infor Process Designer - Here's your Assign Part 2


JavaScript Functions can be utilized two ways within your flow, within the Assign node.

You can use one of the functions that appear in the Function drop down list. If a var1 option exists, then you pass a value into the function and the result is returned back to your selected variable.

These functions exist within a pflow.js file on your local computer as well as on the Landmark server.


You can add your own functions (using the same format, with a header function definition and your actual function() within the body) by creating a new file called pflow_user.js and saving it to the same locations on your desktop and on the server.

This makes sense if you create a function that you might want to use over in your current flow or within a different flow later on. You can, however, create a function that will only be used once.


Click the Add JavaScript Expression button within your Assign and you can build your 'one time use' function.

You will notice that you don't have to declare it to be a function, since it is assumed to be one when you build it. You will also notice that you can utilize the existing functions within this one.

A word of caution - if you update a variable within the Assign using the JavaScript Expression Builder, that variable value can be dropped by your flow (in certain conditions). It is best practice to reassign your variable its own value after setting it using the JavaScript Expression Builder.

By doing this, your variable value is now persistent.

Not just answers, providing solutions