binding-zoom-to-field

Adds foreign key zoom bindings to existing DIVA business entity files.

6|Updated May 11, 2026
One-click install
npx skills add https://github.com/divalto/divalto-ia-devkit --skill binding-zoom-to-field-divalto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: binding-zoom-to-field
Source: https://github.com/divalto/divalto-ia-devkit/tree/main/plugins/divalto-devkit/skills/binding-zoom-to-field
Command: npx skills add https://github.com/divalto/divalto-ia-devkit --skill binding-zoom-to-field-divalto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Retrofitting a foreign key with a standard zoom onto an already-created DIVA business entity requires coordinated edits across the Module Check (.dhsp) and the screen mask (.dhsf); doing this by hand is error-prone and produces orphaned layers that fail linting or compilation. ## Core Features & Use Cases - Module Check enrichment: Injects Module "Gttmchk<target>.dhop" imports and generates Check_<SRC>_Field_<CHAMP> and _Lib procedures in the .dhsp file, with automatic detection of the framework prefix, dictionary, and view name. - Mask enrichment: Coordinates with the shared dhsf_add_fk.py script to add f8=<zoom>, table_associee, diva_apres, zoom button, and the [diva] callback procedure. - Idempotent execution: Re-running with the same FK does not duplicate Module imports or Check procedures. - Use Case: Reproduce the RETEX R-003 scenario by binding the RacPays field of the existing RACECHIEN entity to table T013 via zoom 9053, then verify with the DIVA linter and compiler. ## Quick Start Ask the assistant to bind the RacPays field of the RACECHIEN entity to table T013 using zoom 9053 on the existing .dhsp and .dhsf files.

Frequently Asked Questions about binding-zoom-to-field

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

FAQPage Schema
How do I add a foreign key zoom to an existing DIVA entity?

Run dhsp_add_fk.py on the Module Check .dhsp file with --src-table and --fk CHAMP:TARGET:ZOOM arguments, then run dhsf_add_fk.py on the .dhsf mask with the same FK declaration. Both scripts modify files in place and report changes as JSON.

How do I bind multiple foreign keys to one DIVA entity?

Pass the --fk argument multiple times in a single call, for example --fk RacPays:T013:9053 --fk RacDev:T007:9047 --fk RacDepo:T017:9057. The script adds one Module import and two Check procedures per FK.

What is the difference between pattern A and pattern B for field validation?

Pattern A creates a structural FK in the business object with a zoom selector across three layers. Pattern B only validates that a typed code exists by calling Find_T0xx in a mask override's diva_apres handler, without touching the business object.

Is dhsp_add_fk.py safe to run twice on the same file?

Yes, the script is idempotent for the .dhsp layer: it detects existing Module imports and Check procedures by name and skips duplicates. The .dhsf mask callbacks are also idempotent, though field attribute enrichment is append-only.

What are the limitations of this FK binding approach?

Version 1 supports only 1:1 cardinality. Composite keys, bounded range filters, and polymorphic targets are not supported. It also does not validate that the field exists in the dictionary, so a missing field causes a compilation error.