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. Create the Screen
Section titled “1. Create the Screen”- In Design, under Object Types, select Screen.
- Select +.
- Enter
PurchaseRequestCreateas the Screen ID, then select OK. - Confirm that the Screen’s Layout is set to
Screen.Purchasing.MainLayout. -
Save your changes before continuing.
2. Define the local request variable
Section titled “2. Define the local request variable”- Open the Variables tab.
- Select + Add new variable.
- Configure the variable as follows:
| Property | Value | Purpose |
|---|---|---|
| Name | request | Identifies the request used by this Screen. |
| Context | Local | Keeps the new request in the parent Screen. |
| Type | | Uses the PurchaseRequest Entity. |
| Default expression | | Initializes the new request when the Screen opens. |
-
Save your changes before continuing.
3. Add the Screen instruction
Section titled “3. Add the Screen instruction”- Return to the Layout tab.
- Select the default Text component.
- Set Text to
Please enter the information for the new purchase request below:. -
Leave all other properties at their default values.
-
Save your changes before continuing.
4. Embed PurchaseRequestInclude
Section titled “4. Embed PurchaseRequestInclude”- 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.
- Select the new Screen component.
- Configure its Properties and Inputs tabs as follows:
| Tab | Property | Value | Purpose |
|---|---|---|---|
| Properties | Screen | | Selects the reusable Include Screen. |
| Inputs | request | | Passes this parent Screen's request into the Include Screen. |
-
Leave all other properties at their default values.
-
Save your changes before continuing.
5. Add the Submit Request button
Section titled “5. Add the Submit Request button”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.
- Add a Button below the embedded
PurchaseRequestIncludeScreen. - Configure the button as follows:
| Tab | Property | Value |
|---|---|---|
| Properties | Prefix icon | send |
| Properties | Text | Submit Request |
| Appearance | Color | Primary |
-
Leave all other properties at their default values.
-
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.
Verify the Create Screen configuration
Section titled “Verify the Create Screen configuration”- Open
PurchaseRequestCreate. - Confirm that its
requestvariable uses Local context, typeThis.PurchaseRequest, and default expressionnew This.PurchaseRequest({}, true). - Confirm that the embedded Screen is
Purchasing.PurchaseRequestIncludeand itsrequestinput receivesscreen.request.
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 a value differs, compare PurchaseRequestInclude with Purchase Request Include Screen and PurchaseRequestCreate with Purchase Request Create Screen before building the application.