Skip to content

Purchase Request Create Screen

Key Lesson: Create a parent Screen, initialize its local request, and pass that request into a reusable Include Screen.

Create the PurchaseRequestCreate Screen that users open to enter a new purchase request. This parent Screen owns the request and passes it to the reusable PurchaseRequestInclude Screen.

  1. In Design, under Object Types, select Screen.
  2. Select +.
  3. Enter PurchaseRequestCreate as the Screen ID, then select OK.
  4. Confirm that the Screen’s Layout is set to Screen.Purchasing.MainLayout.
  5. Save your changes before continuing.

  1. Open the Variables tab.
  2. Select + Add new variable.
  3. Configure the variable as follows:
PropertyValuePurpose
NamerequestIdentifies the request used by this Screen.
ContextLocalKeeps the new request in the parent Screen.
Type
This.PurchaseRequest
Uses the PurchaseRequest Entity.
Default expression
new This.PurchaseRequest({}, true)
Initializes the new request when the Screen opens.
  1. Save your changes before continuing.

  1. Return to the Layout tab.
  2. Select the default Text component.
  3. Set Text to Please enter the information for the new purchase request below:.
  4. Leave all other properties at their default values.

  5. Save your changes before continuing.

  1. From SCREEN STRUCTURE, drag a Screen component into the main content area below the Text component.

Editor Help

When dragging a component or variable onto a screen, Lowgile displays a green placeholder indicating where the element can be dropped.

  1. Select the new Screen component.
  2. Configure its Properties and Inputs tabs as follows:
TabPropertyValuePurpose
PropertiesScreen
Purchasing.PurchaseRequestInclude
Selects the reusable Include Screen.
Inputsrequest
screen.request
Passes this parent Screen's request into the Include Screen.
  1. Leave all other properties at their default values.

  2. Save your changes before continuing.

Add the button now so that the first user interface has its primary action. Its click action is connected after the Purchase Request Process is built.

  1. Add a Button below the embedded PurchaseRequestInclude Screen.
  2. Configure the button as follows:
TabPropertyValue
PropertiesPrefix iconsend
PropertiesTextSubmit Request
AppearanceColorPrimary
  1. Leave all other properties at their default values.

  2. Save your changes before continuing.

The button’s click action is configured later in Connect and Test Request Submission. Do not add Process-start behavior at this stage.

  1. Open PurchaseRequestCreate.
  2. Confirm that its request variable uses Local context, type This.PurchaseRequest, and default expression new This.PurchaseRequest({}, true).
  3. Confirm that the embedded Screen is Purchasing.PurchaseRequestInclude and its request input receives screen.request.
Expected result:

Both Screens exist and their variable, binding, collection, and embedded-Screen configuration passes the same PurchaseRequest object from the parent Screen into the reusable Include Screen.

If this does not happen:

If a value differs, compare PurchaseRequestInclude with Purchase Request Include Screen and PurchaseRequestCreate with Purchase Request Create Screen before building the application.