This API runs an anonymous Profound UI program.
In order for this API to successfully run your program, you will need to setup the program as an anonymous program for your Profound UI instance. There are two ways that you can accomplish this:
1) Via the Visual Designer: https://docs.profoundlogic.com/x/y4AM.
2) By editing the database file directly: https://docs.profoundlogic.com/x/qABK
Parameter:
- Optional Config object - JavaScript object containing configuration properties.
Configuration Options:
- program - The qualified program name. E.g LIBRARY/PROGRAM. (Either this or 'mobile' is required.)
- container - Optional. A reference to an element, or an id of an element, where the application will be rendered. If not passed, "pui" is used by default.
- workstnid - Optional. Assigns a workstation id to your session.
- suffixid - Optional. Flag that if enabled avoids duplicate job names by appending a suffix ("1" or "0") Defaults to "0"
- duplicateid - Optional. Flag that if enabled allows duplicate job names ("1" or "0"). Defaults to "0"
- params - Optional. object of parameters to pass to the program for use with the 'program' option
- log - Optional. Turns logging ON or OFF ("1" or "0"). Defaults to "0"
- debug - Optional. Allows you to debug with STRDBG (See Here). Defaults to "0"
- jsonURL - Optional. Loads a json screenshot instead of running a program.
- mobile - Set this to true to use the settings configured under Configure Profound UI Mobile in the Visual Designer. (Either this or 'program' is required.)
- parameter - Optional, a string containing a single parameter to be passed to the initial mobile program. For use with the 'mobile' option.
Example:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type="text/javascript" src" content="text/html; charset=utf-8" /> <script type="text/javascript" src="runtime.js"></script> <title>My own Profound UI template page</title> <script type="text/javascript"> window.onload = function() { pui.run({program:"LIBRARY/PROGRAM"}); }; </script> </head> <body> <div id="pui"> </div> </body> </html>
Example:
The following is an example of how to use the 'params' configuration option with the 'program' option:
pui.run({ program:"LIBRARY/PROGRAM", params:{ p1:"parm1", l1: 50, p2:"parm2", l2: 50, p3:"parm3", l3: 50 } });