getParent()
Last updated 21/01/2026
Definition
The
Examples
The following functions demonstrate how you can use the
Get the parent form from the current page
This code gets the current form page, retrieves the parent form that the page belongs to, and then logs the form's title to the Five Inspector.
const page = five.sender();
const form = page.getParent();
five.log("Parent form retrieved:", form.getTitle());
Access another page in the same form
This code accesses the current form page, retrieves its parent form, and then locates another page within the same form using its page ID. Once the target page is found, the code refreshes that page to reload its data and ensure it reflects the most up-to-date information.
const page = five.sender();
const form = page.getParent();
// Get another page by its ID
const detailsPage = form.getPage("DetailsPage");
detailsPage.refresh();
Read a field from a different page
This code accesses the current form, navigates to another page within the same form, retrieves a specific field from that page, and logs the field's current value to the Five Inspector.
const page = five.sender();
const form = page.getParent();
const summaryPage = form.getPage("Summary");
const statusField = summaryPage.getField("Status");
five.log("Status from Summary page:", statusField.getValue());
Refresh the entire form from one page
This code takes the current page you're on, finds the form it belongs to, and refreshes the entire form.
const page = five.sender();
const form = page.getParent();
five.log("Refreshing entire form");
form.refresh()