---
title: "Workday Extend PMD radioGroup & instanceList Options"
description: "Fix disabled radioGroup widgets hiding all options when selectedValues is empty, pre-select 3+ options on edit pages, and filter options via setValues()."
url: https://kiweely.com/guides/workday-extend-pmd-radiogroup-options-disappear-disable-specific-items
---

# Fixing radioGroup Options Disappearing When selectedValues Is Empty and Disabling Specific Options in Workday Extend PMD

In Workday Extend PMD, setting enabled to false on a radioGroup when selectedValues is null or \[\] hides every option. Learn how to keep unselected radio options visible, bind 3+ option radio groups on edit pages, and filter radioGroup or multi-select instanceList choices with setValues().

-   **Checked** against Workday on November 6
-   Applies to **Workday Extend**
-   3 min read
-   Published November 6
-   By Kiweely

## Why a `radioGroup` Hides All `instanceList` Options When `selectedValues` Is `null` or `[]`

When a Workday Extend PMD page loads prior attestation or profile data from a WQL query and no record exists yet, `selectedValues` on a `radioGroup` evaluates to `null` or an empty list `[]` (`list:emptyList()`). If the `radioGroup` also has `"enabled": false` (read-only mode), Workday Extend **completely hides all radio options**, rendering only the widget label with blank space underneath.

This happens because a read-only (`"enabled": false`) list widget in Workday’s presentation layer only renders the currently selected entries; when `selectedValues` is `[]` or `null`, there is no selected entry to display. By contrast, when `"enabled": true`, setting `"selectedValues": "<% list:emptyList() %>"` renders all `instanceList` radio buttons unselected so the user can make a choice.

### Avoiding the `empty(false)` Boolean Trap on `selectedValues`

A second issue arises when binding `selectedValues` to a boolean field returned by WQL (such as `employeeTobaccoFree`). In PMD scripting, `empty(false)` evaluates to `true`! Writing `empty(row.employeeTobaccoFree) ? [] : ...` treats `false` as empty and returns `[]` instead of selecting the `"NO"` radio button.

Always check `== null` explicitly before testing boolean values, and ensure `"enabled": true` whenever the user needs to see unselected radio buttons:

json

```
{
  "type": "radioGroup",
  "id": "tobaccoAttestationRadio",
  "label": "Certification for Employee",
  "enabled": true,
  "hideDisplayOption": true,
  "instanceList": [
    {
      "id": "YES",
      "descriptor": "Tobacco-Free: I have not used tobacco products within the past 30 days."
    },
    {
      "id": "NO",
      "descriptor": "Tobacco-User: I have used tobacco products within the past 30 days."
    }
  ],
  "selectedValues": "<%
    empty(workerAttestation.data)
      ? list:emptyList()
      : workerAttestation.data[0].employeeTobaccoFree == null
        ? list:emptyList()
        : workerAttestation.data[0].employeeTobaccoFree == true
          ? list:toList('YES')
          : list:toList('NO')
  %>"
}
```

## Pre-Selecting a `radioGroup` with Three or More Options on an Edit Page

On an edit page, `selectedValues` on a `radioGroup` must always evaluate to a **1-element list containing the exact `id` string** from `instanceList` (or `[]` when no selection exists). Returning a bare string (`'Research'`) instead of a list (`['Research']`), or comparing against the option’s `id` when the inbound endpoint actually returns the `descriptor` text (`'Administrative Service'` vs `'AdminService'`), causes the wrong radio button—or none—to be selected.

When mapping an inbound field across three or more options, return `[]` when the field is empty and wrap the nested ternary inside `[...]` so it always produces a 1-element list matching the option `id`:

json

```
{
  "type": "radioGroup",
  "id": "activityCategoryRadio",
  "label": "Activity Category",
  "hideDisplayOption": true,
  "instanceList": [
    {
      "id": "Research",
      "descriptor": "Research"
    },
    {
      "id": "AdminService",
      "descriptor": "Administrative Service"
    },
    {
      "id": "NonAdminService",
      "descriptor": "Non-Administrative Service"
    }
  ],
  "selectedValues": "<%
    empty(getNIA.activityCategory)
      ? []
      : [
          getNIA.activityCategory == 'Research'
            ? 'Research'
            : getNIA.activityCategory == 'Administrative Service'
              ? 'AdminService'
              : getNIA.activityCategory == 'Non-Administrative Service'
                ? 'NonAdminService'
                : ''
        ]
  %>"
}
```

## Disabling Specific Options in a `radioGroup` or Multi-Select `instanceList` via `setValues()`

Neither `radioGroup` nor `instanceList` supports an `enabled` attribute on individual list items; calling `widget.setEnabled(false)` disables the entire control. When business rules require disabling one option based on another dropdown or when selecting an exclusive option (such as `"None of the above"` in a multi-select `instanceList`), dynamically filter the available choices using **`setValues(List dataSource)`** and update the active selection using **`setValue(List ids)`**.

### Filtering `radioGroup` Options from a Dropdown `onChange`

When selecting `'List2'` in a dropdown should prevent the user from choosing `'yes'` in a `radioGroup`, call `yesNoRadio.setValues(...)` and `yesNoRadio.setValue(['no'])` inside the dropdown’s `onChange` script:

json

```
{
  "type": "dropdown",
  "id": "listSelection",
  "label": "Select Category",
  "instanceList": [
    { "id": "List1", "descriptor": "Standard Category" },
    { "id": "List2", "descriptor": "Restricted Category" }
  ],
  "onChange": "<%
    if (!empty(self.value)) {
      if (self.value[0] == 'List1') {
        yesNoRadio.setValues([
          { 'id': 'yes', 'descriptor': 'Yes' },
          { 'id': 'no', 'descriptor': 'No' }
        ]);
      } else if (self.value[0] == 'List2') {
        yesNoRadio.setValues([
          { 'id': 'no', 'descriptor': 'No' }
        ]);
        yesNoRadio.setValue(['no']);
      }
    }
  %>"
},
{
  "type": "radioGroup",
  "id": "yesNoRadio",
  "label": "Include Allowance?",
  "hideDisplayOption": true,
  "instanceList": [
    { "id": "yes", "descriptor": "Yes" },
    { "id": "no", "descriptor": "No" }
  ]
}
```

### Enforcing an Exclusive Option in a Multi-Select `instanceList`

Similarly, if a `multiSelect: true` `instanceList` has three options where `'OPT3'` is mutually exclusive with `'OPT1'` and `'OPT2'`, store the complete option list in `pageVariables.allOptions` during `onLoad` and use `onChange` to narrow or restore `self.setValues(...)`:

json

```
{
  "type": "instanceList",
  "id": "exclusiveMultiList",
  "label": "Select Applicable Programs",
  "multiSelect": true,
  "values": "<% pageVariables.allOptions %>",
  "selectedValues": "<% [] %>",
  "onChange": "<%
    var exclusiveId = 'OPT3';
    var picked = self.value ?? [];
    var hasExclusive = !empty picked.find(selected => { selected == exclusiveId });
    if (hasExclusive) {
      var exclusiveOpt = pageVariables.allOptions.find(opt => { opt.id == exclusiveId });
      self.setValues([exclusiveOpt]);
      self.setValue([exclusiveId]);
    } else {
      self.setValues(pageVariables.allOptions);
    }
  %>"
}
```

When the user selects `'OPT3'`, `self.setValues([exclusiveOpt])` removes `'OPT1'` and `'OPT2'` from the selectable list and `self.setValue(['OPT3'])` clears any prior selections. When the user removes `'OPT3'` chip from the input box, `self.setValues(pageVariables.allOptions)` immediately restores all three options.

## How to Verify in the Tenant

1.  Open the PMD page in your Workday Extend tenant as a user with no existing attestation record and confirm that all `radioGroup` options display unselected when `"enabled": true`.
2.  Test a record where a boolean WQL field is `false` and verify that the `"NO"` radio option is selected rather than blank.
3.  On an edit page with a 3-option `radioGroup`, test saving and reloading each of the three options to verify `selectedValues` maps the saved value back to the exact option `id`.
4.  Select the restricted dropdown value or exclusive `instanceList` item and confirm that `setValues()` and `setValue()` restrict the selectable items and restore them when deselected.

## Sources checked

-   [radioGroup PMD Tag Reference](https://developer.workday.com/documentation/wez1518210811362)
-   [instanceList PMD Tag Reference](https://developer.workday.com/documentation/hcb1512514976081)
-   [Reference: PMD Scripting Widget Methods](https://developer.workday.com/documentation/hno1582318947208)
-   [Concept: instanceList](https://developer.workday.com/documentation/GUID-17f49183-14bb-4cd3-95a1-1e3dd8ded432-enHYPHENus)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Why a RaaS Endpoint Returns HTTP 200 with data as null in PMD and How to Surface SOAP Fault Messages Workday RaaS JSON endpoints wrap rows inside Report\_Entry instead of data, causing raasEndpoint.data to evaluate to null in PMD. Learn how to parse Report\_Entry, avoid list:excludeMultiple() errors on string lists, and surface SOAP fault messages from synchronous orchestrations.](https://kiweely.com/guides/workday-extend-pmd-raas-report-entry-null-soap-fault-http-200)
-   [### 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.](https://kiweely.com/guides/workday-extend-pmd-conditional-page-routing-tabbar-flowvariables-limits)
-   [### Clearing Grid Cell Validation Errors on onChange and Blocking Page Save on pageActionButton Failure in Workday Extend PMD Learn how to clear cell-level validation errors in Workday Extend PMD grids when a user updates a cell, avoid the getSelectedRows() border-highlighting trap during onSubmit, and block page submission when a pageActionButton deferred WQL lookup fails.](https://kiweely.com/guides/workday-extend-pmd-clear-grid-cell-error-pageactionbutton-block-save)

### More guides on Extend apps and pages

[All 97 guides](https://kiweely.com/guides#extend)

-   [Why PATCH from an SSO PMD Page Fails with unrecognized field While the Same Payload Succeeds in Postman](https://kiweely.com/guides/workday-extend-pmd-patch-unrecognised-field-sso-vs-postman)
-   [Deleting Selected Grid Rows and Fixing Parallel Multi-Instance Arrays Collapsing on Edit Pages in Workday Extend PMD](https://kiweely.com/guides/workday-extend-pmd-grid-delete-selected-rows-parallel-arrays-collapse)
-   [Displaying dynamicColumns in a Workday Extend PMD Grid and Flattening Nested Arrays into Rows](https://kiweely.com/guides/workday-extend-pmd-dynamic-grid-columns-flattening-arrays)
-   [Resolving “Tenant mapping not found (OP-4008)”, EU vs. US Regional Base URL 401 Errors, and client\_secret\_basic in Workday Extend OAuth 2.0](https://kiweely.com/guides/workday-extend-oauth-tenant-mapping-op-4008-eu-base-url-client-secret-basic)
-   [Working Around the 10-Relationship Limit on a Workday Extend Model Business Object (MCBO) Using a Helper Object](https://kiweely.com/guides/workday-extend-mcbo-10-single-instance-relationship-limit-helper-bo)
-   [How to Blank Out Text Fields and Nullify Reference Values on Workday Extend Business Objects via Inbound EIB Using {empty}](https://kiweely.com/guides/workday-extend-eib-clear-text-nullify-fields-empty-tag)
-   [Fixing “Object instance has properties which are not allowed by the schema (parentBusinessProcesses, initiationPageRoute)” on Extend Subprocesses](https://kiweely.com/guides/workday-extend-bp-subprocess-allowedparentprocesses-eventstepid)
-   [Cascading dropdowns and instance lists in Workday Extend](https://kiweely.com/guides/workday-extend-cascading-instance-lists)

### From the blog on Extend apps and pages

[All posts](https://kiweely.com/blog)

-   [Workday Extend vs. configuration: how to decide](https://kiweely.com/blog/extend-app-or-workday-configuration)
-   [Why Workday Extend doesn’t need to be a developer-only tool](https://kiweely.com/blog/extend-not-developer-only)
-   [What AI developer tools do you get with Workday Extend, and is a generic chatbot enough?](https://kiweely.com/blog/kiweely-vs-generic-ai-for-workday-extend)

## Let Workday check the work.

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

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

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