The Close Page task is used to close a page, dialog, or popover that was previously opened via the Show Page task. In addition to simply closing the page, it can return a response type (Ok, Cancel, Yes, No) and optional response data back to the parent page.
This makes it possible to build two-way communication between pages, similar to Windows Forms’ ShowDialog
returning a DialogResult
and custom data.
Purpose
- Close the current Page / Dialog / Popover.
- Send back a response type (Ok, Cancel, Yes, No).
- Send back data to the calling page, which can be consumed directly.
Anatomy
- Step name
- Name of the task in the event flow.
- Example:
Close page
.
- Response
- Select which response type should be returned when closing:
- Ok
- Cancel
- Yes
- No
- The calling page can branch its logic depending on this response.
- Select which response type should be returned when closing:
- Response data
- The most important field.
- Allows you to send structured data back to the page that opened this one.
- Can be a single value, an object, or multiple fields.
- Example:
{{ Input1.value }}
- If the current page has a form, you can return the entire form’s data here.
How It Works with Show Page
- Parent page uses Show Page task to open another page (e.g.,
CustomerForm
).- Parent sets a scope name like
page1
.
- Parent sets a scope name like
- In the opened page (
CustomerForm
), when the user finishes:- Close Page task runs with:
- Response:
Ok
- Response data:
{ id: CustomerIdInput.value, name: CustomerNameInput.value }
- Response:
- Close Page task runs with:
- Back in the parent page:
- You can access returned values using:
{{ page1.data.id }} {{ page1.data.name }}
- The parent flow can check response type →
if response ok
→ process returned data.
- You can access returned values using:
Example 1: Simple Value Return
- Response type:
Ok
- Response data:
{{ Input1.value }}
Parent usage:
{{ page1.data }}
Example 2: Return Object
- Response type:
Ok
- Response data:
{ id: IdInput.value, name: NameInput.value, email: EmailInput.value }
Parent usage:
{{ page1.data.id }}
{{ page1.data.name }}
{{ page1.data.email }}
Example 3: Cancel Action
- Response type:
Cancel
- Response data:
{ cancelled: true }
Parent usage:
- Parent flow branches on
if response not ok
→ Show notification “Action cancelled.”
Best Practices
- Always return structured data when possible (object format), not just raw values.
- Use descriptive response types (
Ok
for success,Cancel
for dismiss). - Scope names are key → Make sure the parent’s Show Page step has a unique scope name so you can reference returned data easily.
- Keep responses consistent → If one branch returns
{id, name}
, avoid returning just a string in another branch.
FAQ
Q: How do I read data returned from a closed page?
A: Use the scope name defined in Show Page: {{ page1.data.fieldName }}
Q: Can I pass arrays or complex objects?
A: Yes. The Response data can be any valid object/array.
Q: What happens if I don’t define Response data?
A: The parent still receives the response type (Ok/Cancel/Yes/No), but no extra data.
👉 In summary: Close Page lets you not only close a page but also return values and results back to the parent. Together with Show Page, it enables powerful modal workflows with data passing and response handling.