display.screen.execute()

 

This method displays a screen defined as a record format in a Rich Display File, waits for the user to respond, and reads the response. It is equivalent to issuing a display.screen.write() immediately followed by a display.screen.read().

Parameter

  1. Data structure (optional) - A Profound.js data structure reference or a primitive JavaScript object. If specified and not null, the screen is populated with the values from the data structure or object and the response is repopulated back into the data structure or object. If not specified or specified as null, global fields are used to send and receive values to and from the screen. If the data structure is not qualified, you must wrap the parameter with the pjs.ds() API.

  2. Message (optional) - Additional information sent to the screen's onmessage event. The message can be supplied using any primitive JavaScript value, including Strings, Objects, and Arrays.

Examples

Using global fields
pjs.defineDisplay("mydisplay.json"); mydisplay.myscreen.execute();

 

Using a primitive object
pjs.defineDisplay("mydisplay.json"); mydisplay.myscreen.execute({ field1: "value1", field2: "value2" });

 

Using a data structure
pjs.defineDisplay("mydisplay.json"); pjs.define("S1", { type: 'data structure', extName: { file: 'MYDISPLAY', format: 'MYSCREEN' } }); mydisplay.myscreen.execute(pjs.ds("S1"));

 

Using the message parameter

 

RPG Equivalent

EXFMT