BluKavantUI Design system
PATTERNS

Select & assign

Move choices from available to assigned with clear, reversible actions.

SELECT & ASSIGN / IMPLEMENTATION RECIPE

Preview an assignment before it becomes real.

Build a reviewer assignment with three distinct states: checked items, the pending assignment and the last saved assignment. Moving a person to the right-hand list is a draft change; Apply is the save.

Use TransferList when comparing available and assigned sets is useful. Use Select for one short choice, TreeSelect for a hierarchy, or a searchable picker for a very large remote directory.

SAVEDTaylor + Casey2 reviewers
PENDINGTaylor + Casey + Alex3 reviewers · not saved
AFTER APPLYServer accepts 3 keysReplace saved set
WORKING COMPOSITION

An editable pending set with separate Apply, discard and rejected-save recovery.

Real BluKavantUI components, with a small application controller. Data and save responses are simulated in this page; reload resets the example.

Loading the interactive recipe…

Try this sequence
  1. Check Alex and choose Add checked. The pending count becomes 3; saved reviewers still show Taylor and Casey.
  2. Choose Discard assignment changes. Alex returns to the available list.
  3. Add Alex again, check Reject the next save, and Apply assignment. The pending set remains available.
  4. Retry Apply. The saved summary now includes Alex. Taylor is required and cannot be removed.
IMPLEMENT THE WORKFLOW

Build select & assign into your application.

TransferList ↗

Displays both sets and moves checked batches.

Application actions

Apply saves the complete pending set; Discard restores the last accepted set.

  1. Start with stable keys

    Each item has a persistent Key and a human-readable Label. Labels can change or be duplicated; keys identify membership.

  2. Separate checked from assigned

    A checkbox marks a candidate for Add/Remove. Only a move changes SelectedKeys. Search narrows a list; it is not an assignment command.

  3. Save the entire pending set

    SelectionChanged updates pending keys. Apply submits that complete set to the server, which enforces eligibility and required members.

  4. Accept or restore deliberately

    After success, replace saved and pending with the returned keys. After failure, retain pending. Discard uses the last saved keys.

State / contractImplementation
ItemsComplete bounded TransferItem[] with Key, Label, optional Description and IsDisabled.
PendingSelectedKeys: string[]. SelectionChanged returns the new complete set after a move.
Required memberTaylor starts selected and IsDisabled=true. The service must also enforce Taylor’s membership.
Save resultReturn the canonical full key set. Replace the saved baseline only after a successful response.

Web implementation

Call mount(host, items, savedKeys, saveAssignment). The function keeps saved and pending arrays separate and disables moves during Apply. Implement saveAssignment as an authorized update of the full set. The demo adapter can reject once; no assignments are persisted across reloads.

Install Community and the required Pro add-on for Grid or Kanban recipes, import @blukavantui/community/styles.css, and use a connected host element. The companion CSS styles the surrounding fields, navigation and status messages.

Keep the recipe and shared.ts together; TypeScript resolves the recipe’s ./shared.js import. Add class="recipe-demo" to your host. Supply your records and backend callback as the mount arguments. The downloads use Community 1.0.0 and Pro 1.0.0 imports; the live demo retains its previously verified SDK 0.9.0 runtime.

View the TypeScript recipe
import { createTransferList } from '@blukavantui/community/transfer-list';
import type {TransferItem} from '@blukavantui/community';
import { node, button, status } from './shared.js';
export type SaveAssignment = (keys: string[]) => Promise<string[]>;
export function mount(host: HTMLElement, items: TransferItem[], initial: string[], save: SaveAssignment) {
  let saved = [...initial], pending = [...initial], busy = false, disposed = false;
  const summary = node('p'), target = node('div'), actions = node('div', '', 'recipe-toolbar');
  host.append(summary, target, actions); const message = status(host);
  const transfer = createTransferList(target, {
    Items: items, SelectedKeys: pending, ShowSearch: true,
    AvailableLabel: 'Available reviewers', SelectedLabel: 'Pending reviewers',
  }, { SelectionChanged: keys => { pending = [...keys]; render(); message.textContent = 'Assignment changed locally. Choose Apply to save.'; } });
  const apply = button('Apply assignment', async () => {
    if (busy) return; busy = true; render(); transfer.update({ IsDisabled: true });
    message.textContent = 'Saving assignment…';
    try {
      const result = await save([...pending]); // Server rechecks eligibility and required members.
      if (disposed) return;
      saved = [...result]; pending = [...result]; transfer.update({ SelectedKeys: pending });
      message.textContent = 'Assignment saved.';
    } catch {
      if (disposed) return;
      message.textContent = 'Could not save. The pending assignment is still here.';
    } finally {
      if (!disposed) { busy = false; transfer.update({ IsDisabled: false }); render(); }
    }
  });
  const cancel = button('Discard assignment changes', () => {
    pending = [...saved]; transfer.update({ SelectedKeys: pending }); render(); message.textContent = 'Restored the last saved assignment.';
  });
  actions.append(apply, cancel);
  function render() {
    const names = saved.map(key => items.find(item => item.Key === key)?.Label || key);
    summary.textContent = `Saved reviewers: ${names.join(', ') || 'None'}. Pending: ${pending.length}.`;
    const unchanged = JSON.stringify([...saved].sort()) === JSON.stringify([...pending].sort());
    apply.disabled = busy || unchanged; cancel.disabled = busy || unchanged;
  }
  render();
  return { destroy() { disposed = true; transfer.destroy(); host.replaceChildren(); } };
}

OutSystems implementation

Use BluKavantUi_Community_Inputs → TransferList in either edition. Reference its own BluTransferItem structure; Pro consumers reuse the same Community producer.

Binding / handlerImplementation
Local variablesSavedKeysJson and PendingKeysJson (Text), both initialized from the authorized saved assignment. Add IsSaving (Boolean).
Block inputsItems=your BluTransferItem List; SelectedKeysJson=PendingKeysJson; IsDisabled=IsSaving. Use AvailableLabel and SelectedLabel to name the two sets.
OnChangedAssign its SelectedKeysJson output to PendingKeysJson. This is a local update, not a database write.
Apply actionSet IsSaving=True; send PendingKeysJson to your Server Action. On success assign its canonical key JSON to both SavedKeysJson and PendingKeysJson.
Failure and discardOn failure keep PendingKeysJson and show an inline error. Always clear IsSaving. Discard assigns SavedKeysJson to PendingKeysJson.

Add these native Blocks to your consumer Screen, bind the listed events and connect your application actions. The interactive example above runs the web implementation.

Open the full native TransferList API →
AVOID THESE FAILURES

What breaks this workflow

Treating a checked box as saved

Checked, assigned and persisted mean different things. Keep the Apply action and saved summary explicit.

Saving labels instead of IDs

Renames and duplicate display names break membership. Persist stable keys.

Trusting disabled UI

A disabled required reviewer is an explanation, not enforcement. Recheck the submitted set server-side.

BEFORE YOU SHIP

Verify the behavior, including recovery.

  • Moving items does not change the saved summary until Apply succeeds.
  • Discard restores the last saved set, including required members.
  • Failed Apply keeps the pending set and enables a retry.
  • Search does not remove assigned keys. Recheck marks after filtering; transient checkmarks are not the saved assignment.

Use the linked component accessibility notes when reviewing focus, keyboard behavior and status announcements in your implementation.

All patterns →

Search BluKavantUI