vp-set-custom-functions

vp-set-custom-functions is a command for Claude Code from Ganbin/4d-development-skill. It costs 0 tokens per session (1,344 once invoked), scanned A, original, MIT.

A spreadsheet command that makes selected 4D formulas available as functions inside 4D View Pro formulas. These functions are registered when the sheet loads.

In plain words
What is it for?
Use it to expose 4D methods as named functions that users can select while writing formulas.
Why use it?
It lets spreadsheet formulas call approved application logic instead of being limited to built-in spreadsheet functions.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: positional $N argument.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ganbin/4d-development-skill/vp-set-custom-functions
Clone the repo
git clone --depth 1 https://github.com/Ganbin/4d-development-skill

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vp-set-custom-functions

README.md
[![agentmods](https://agentmods.dev/badge/commands/ganbin/4d-development-skill/vp-set-custom-functions.svg)](https://agentmods.dev/commands/ganbin/4d-development-skill/vp-set-custom-functions)
Your own site
<a href="https://agentmods.dev/commands/ganbin/4d-development-skill/vp-set-custom-functions"><img src="https://agentmods.dev/badge/commands/ganbin/4d-development-skill/vp-set-custom-functions.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01344
Opus 5 $0.00000 $0.00672
Sonnet 5 $0.00000 $0.00269
Haiku 4.5 $0.00000 $0.00134

Measured 2d ago against content hash a802645a59c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

vp-set-custom-functions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/ViewPro/commands/vp-set-custom-functions.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

VP SET CUSTOM FUNCTIONS ( vpAreaName : Text ; formulaObj : Object )

Parameter Type Description
vpAreaName Text -> 4D View Pro area form object name
formulaObj Object -> Formula object

Description

The VP SET CUSTOM FUNCTIONS command designates the 4D formulas that can be called directly from 4D View Pro formulas. Because custom functions are not stored in the document,VP SET CUSTOM FUNCTIONS must be executed in the On Load form event.

The formulas specified by VP SET CUSTOM FUNCTIONS appear in a pop-up menu when the first letter of their name is entered. See the Formulas and Functions page.

If VP SET CUSTOM FUNCTIONS is called multiple times for the same area, in the same session, only the last call is taken into account.

Pass the name of the 4D View Pro area in vpAreaName. If you pass a name that does not exist, an error is returned.

In the formulaObj parameter, pass an object containing the 4D formulas that can be called from 4D View Pro formulas as well as additional properties. Each customFunction property passed in formulaObj becomes the name of a function in the 4D View Pro area.

Property Type Description
<customFunction> Object Custom function definition. <customFunction> defines the name of the custom function to display in 4D View Pro formulas (no spaces allowed)
formula Object 4D formula object (mandatory). See the Formula command.
parameters Collection of objects Collection of parameters (in the order they are defined in the formula). For more information, please refer to the Parameters section.
[ ].name Text Name of parameter to display in 4D View Pro
[ ].type Number Type of the parameter. Supported types:Is BooleanIs collectionIs dateIs IntegerIs objectIs realIs textIs timetype can be omitted or the default value (-1) can be passed (except when at least one parameter is of collection type, in which case parameter's type declaration is mandatory). If type is omitted or -1, the value is automatically sent with its type, except date or time values which are sent as an object. If type is Is object, the object is sent in a .value property. See Parameters section.
summary Text Formula description to display in 4D View Pro
minParams Number Minimum number of parameters
maxParams Number Maximum number of parameters. Passing a number higher than the length of parameters allows declaring "optional" parameters with default type

WARNING

  • As soon as VP SET CUSTOM FUNCTIONS is called, the methods allowed by the VP SET ALLOWED METHODS command (if any) are ignored in the 4D View Pro area.
  • As soon as VP SET CUSTOM FUNCTIONS is called, the functions based upon SET TABLE TITLES and SET FIELD TITLES commands are ignored in the 4D View Pro area.

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 94 lines · 0 tokens per session scan A a802645a59c8

Subscribe to this mod's changes

vp-set-custom-functions is a command published in the GitHub repository Ganbin/4d-development-skill (9 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,344 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.