Skip to content
KiweelyKiweelyKiweely

Conditional Page Routing on Load, multiStepLayout vs. tabBar Navigation, and flowVariables Payload Limits in Workday Extend PMD

Workday Extend PMD does not expose a redirect API in onLoad, cannot switch tabBar tabs from a button, and serializes flowVariables on the server across page transitions. Learn how to use conditional pods, multiStepLayout or editWizard, and Business Object persistence.

  • Checked against Workday on
  • Applies to Workday Extend
  • 3 min read
  • Published
  • By Kiweely
On this page

Why PMD onLoad Cannot Auto-Redirect to Another Page (and How to Use Conditional Pods)

Workday Extend Presentation Metadata (PMD) does not expose an imperative navigation or redirect method that fires during the onLoad page lifecycle. Page-to-page navigation in Workday Extend only occurs when a user clicks a button (linked to a taskId), clicks an externalLink, or submits an edit page that triggers a flowDefinitions transition in the Application Metadata (.amd) file.

When you need a user opening a task to see one of two completely different page experiences based on an inbound WQL or REST check at load time—for example, showing an Enrollment Form if the worker has not enrolled yet, or an Enrollment Summary page if a record already exists—encapsulate each experience inside its own Pod (.pod) and conditionally render the matching pod on a single host PMD page:

json
{
  "id": "enrollmentRouterPage",
  "endPoints": [
    {
      "name": "workerEnrollmentCheck",
      "baseUrlType": "wql",
      "authType": "sso",
      "url": "<% '/data?query=' + string:urlEncode('SELECT workdayID, status FROM customApp_enrollments WHERE worker = \\'' + currentLoggedInUser.id + '\\' LIMIT 1') %>"
    }
  ],
  "presentation": {
    "pageType": "edit",
    "title": {
      "type": "title",
      "label": "Program Enrollment"
    },
    "body": {
      "type": "section",
      "id": "routerBodySection",
      "children": [
        {
          "type": "pod",
          "podId": "newEnrollmentFormPod",
          "render": "<% empty(workerEnrollmentCheck.data) %>"
        },
        {
          "type": "pod",
          "podId": "existingEnrollmentSummaryPod",
          "render": "<% !empty(workerEnrollmentCheck.data) %>"
        }
      ]
    }
  }
}

Because render is evaluated on the server during page load after inbound endPoints complete, only the matching pod is instantiated and sent to the browser. If the two experiences require different pageType behaviors (for example, an edit page versus a read-only view page with no OK button), use a lightweight landing view page with conditional button widgets whose taskReference routes the user to the appropriate target taskId.

Switching Sections with Buttons: Use multiStepLayout or editWizard Instead of tabBar

When designing a long data-entry form, developers often group sections into a six-tab tabBar layout and then attempt to add a Proceed to Next Tab button at the bottom of each tab.

In Workday Extend PMD:

  • button widgets navigate between separate PMD tasks (taskId) or external URLs.
  • pageActionButton widgets run PMD scripts on the current page, but tabBar does not expose a scripting method (such as setActiveTab()) to switch the selected tab programmatically.

If your users require guided Next and Previous button navigation across sections of a single PMD page, replace tabBar with multiStepLayout (up to 10 steps, supported on both view and edit pages as the top-level tag inside body) or editWizard:

json
{
  "id": "onboardingProfilePage",
  "endPoints": [],
  "presentation": {
    "pageType": "edit",
    "title": {
      "type": "title",
      "label": "Onboarding Profile"
    },
    "body": {
      "type": "multiStepLayout",
      "id": "onboardingWizard",
      "steps": [
        {
          "type": "layoutSection",
          "id": "step1WorkerDetails",
          "children": [
            {
              "type": "fieldSet",
              "id": "workerFieldSet",
              "title": "Step 1: Worker Details",
              "children": [
                {
                  "type": "text",
                  "id": "workerName",
                  "label": "Full Name",
                  "required": true
                }
              ]
            }
          ]
        },
        {
          "type": "layoutSection",
          "id": "step2Equipment",
          "children": [
            {
              "type": "fieldSet",
              "id": "equipmentFieldSet",
              "title": "Step 2: Equipment and Access",
              "children": [
                {
                  "type": "instanceList",
                  "id": "equipmentType",
                  "label": "Equipment Type",
                  "instanceList": [
                    { "id": "LAPTOP", "descriptor": "Laptop" },
                    { "id": "DESKTOP", "descriptor": "Desktop" }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

multiStepLayout automatically renders numbered progress steps at the top of the page and provides built-in step navigation controls without requiring custom taskId transitions. Note that multiStepLayout must be the root widget of body and cannot be nested inside a pod.

Understanding flowVariables Server-Side State and Data Volume Limits

When passing data from one PMD page to the next inside an .amd page flow (flowDefinitions), developers use an outboundVariable endpoint with "variableScope": "flow" and read the values on the destination page via flowVariables.

A common misconception is that flowVariables are stored purely in browser memory on the client. In reality, PMD scripting and flowVariables are server-side state managed by the Workday Extend presentation runtime. That is why flowVariables must be populated through an outboundVariable endpoint inside outboundData when the first page submits:

json
"outboundData": {
  "outboundEndPoints": [
    {
      "type": "outboundVariable",
      "name": "transitionOutboundVars",
      "variableScope": "flow",
      "values": [
        {
          "outboundPath": "batchRequestId",
          "value": "<% createBatchRequest.id %>"
        },
        {
          "outboundPath": "isValid",
          "value": "<% !empty(createBatchRequest.id) %>"
        }
      ]
    }
  ]
}

Because flowVariables are serialized into the server-side page context and transmitted between the browser and the Workday presentation server on page transitions, passing hundreds of grid rows or large nested JSON objects inside flowVariables increases network round-trip payload size, slows down next-page rendering, and risks hitting presentation state serialization limits.

Best Practice for Passing Multi-Row Grid Data Across Pages

Instead of serializing an entire 500-row grid array into flowVariables:

  1. Persist the grid rows to a Model Business Object on the first page (or save the filter criteria/parent record).
  2. Pass only the lightweight parent Business Object id or query filter parameters inside flowVariables (as shown with batchRequestId above).
  3. Query the rows on the destination page using an inbound WQL or Business Object REST endpoint filtered by flowVariables.batchRequestId.

How to Verify in the Tenant

  1. Deploy the host PMD page with conditional pods and open it with both an enrolled and an unenrolled user account to confirm that the render expression displays the appropriate pod on load without requiring a second click.
  2. Open the multiStepLayout page and verify that users can step forward and backward across layoutSection steps before submitting the page.
  3. Inspect network timing and View Application Logs when transitioning across pages in a flowDefinitions flow, confirming that only lightweight identifiers are passed in flowVariables while the destination page fetches the grid rows via its inbound endpoint.

Sources checked

Related guides

All guides

Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.

We’ll email you once to confirm. Unsubscribe in one click from any issue.