set-virtualization-code

Set JavaScript virtualization code for NovaDB virtual attributes via novadb_cms_update_objects.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/novadb/claude-plugins --skill set-virtualization-code
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: set-virtualization-code
Source: https://github.com/novadb/claude-plugins/tree/main/consulting/skills/set-virtualization-code
Command: npx skills add https://github.com/novadb/claude-plugins --skill set-virtualization-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines setting server-side JavaScript that computes virtual attribute values, removing manual edits and ensuring derived-data logic is stored centrally in NovaDB attribute definitions.

Core Features & Use Cases

  • Set Virtualization Code: Write JavaScript into attribute 1009 to define how a virtual attribute's value is computed.
  • Transactional Updates: Apply changes on a specific branch via novadb_cms_update_objects with audit comment support.
  • Use Case: A developer or consultant centralizes derived-value logic by updating the virtualization code for an existing virtual attribute so all reads return computed values server-side.

Quick Start

Set the virtualization code for attribute 12345 on your active branch by sending an update that writes your JavaScript into attribute 1009 with language 0 and variant 0 using novadb_cms_update_objects.

Frequently Asked Questions about set-virtualization-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set server-side JavaScript for virtual attributes in NovaDB?▼

To set server-side JavaScript for virtual attributes, you apply a patch update via the novadb_cms_update_objects tool, writing your JavaScript code into attribute 1009 with language 0 and variant 0 on a specific branch.

What is a virtual attribute in NovaDB and how is its value computed?▼

A virtual attribute in NovaDB is an attribute definition marked with isVirtual (attribute 1020). Its value is computed server-side using JavaScript virtualization code stored centrally within the attribute definition.

What information do I need to update virtualization code on an existing attribute?▼

Updating virtualization code requires a branch ID, object meta with id and typeRef 10, CmsValue entries containing the JavaScript in attribute 1009 with language 0 and variant 0, and an audit comment for the transaction.

Does setting virtual attribute code require a specific branch or transaction tool?▼

Yes, setting virtual attribute code requires targeting a specific NovaDB branch ID. The update must be applied transactionally using the novadb_cms_update_objects tool to ensure changes are audited and stored correctly.

Why are my virtual attribute values not updating after changing the definition?▼

Virtual attribute values may not update if the JavaScript was not written into the correct CmsValue variant. You must target attribute 1009 with language 0 and variant 0, and apply the patch update through novadb_cms_update_objects.

Can I centralize derived data logic by updating virtual attribute definitions?▼

Yes, centralizing derived data logic is the primary use case. By updating the virtualization code on an existing virtual attribute, all subsequent server-side reads will return the newly computed values.