Initializing help system before first use

# VDL Entity editing

Entity values can be set, updated, and removed using vdl actions. For the latest versions of these examples, visit the FICO VDL Online Reference.

## Toggle Boolean Scalar

This example uses a button to trigger the vdl action stored in an action group that toggles the myBool entity value. The action is called from the button by referencing the name of the action group.

View Designer
Code editor

        <vdl-page>
            <vdl-header draggable="true">
                <vdl-action-group draggable="true" name="update_Ent">
                    <vdl-action-update-entity value="=!scenario.entities.myBool.value" entity="myBool"></vdl-action-update-entity>
                </vdl-action-group>
            </vdl-header>
            <vdl-section heading="VDL Entity 1">
                <vdl-row>
                    <vdl-column size="12">
                        <vdl-form>
                            <vdl-field entity="myBool"></vdl-field>
                            <vdl-button vdl-event="click:actions.update_Ent" label="Update"></vdl-button>
                        </vdl-form>
                    </vdl-column>
                </vdl-row>
            </vdl-section>
        </vdl-page>

## Remove Scalar Value

The `vdl-action-remove-entity` action sets a scalar to its default value. For each data type, these are; INTEGER=0, REAL=0, BOOLEAN=false, and STRING="".

Code editor

        <vdl-page>
            <vdl-header draggable="true">
                <vdl-action-group draggable="true" name="remove_Ent">
                    <vdl-action-remove-entity value="=!scenario.entities.myBool.value" entity="myBool"></vdl-action-remove-entity>
                </vdl-action-group>
            </vdl-header>
            <vdl-section heading="VDL Entity 2">
                <vdl-row>
                    <vdl-column size="12">
                        <vdl-form>
                            <vdl-field entity="myBool"></vdl-field>
                            <vdl-button vdl-event="click:actions.remove_Ent" label="Remove"></vdl-button>
                        </vdl-form>
                    </vdl-column>
                </vdl-row>
            </vdl-section>
        </vdl-page>

## Update Entity Array with Indices

Update a value in a multi-dimensional array by specifying the array, indices, and value. The `vdl-action-update-entity` example here increments the value for New York, January in the array FactorySupply.

Code editor

        <vdl-page>
            <vdl-header draggable="true">
                <vdl-action-group draggable="true" name="update_Ent">
                    <vdl-action-update-entity
                    entity="FactorySupply"
                    value="=scenario.entities.FactorySupply(['New York', 'January']).value + 1"
                    scenario="0"
                    indices="=['New York', 'January']">
                    </vdl-action-update-entity>
                </vdl-action-group>
            </vdl-header>
            <vdl-section heading="VDL Entity 3">
                <vdl-row>
                    <vdl-column size="12">
                        <vdl-form>
                            <vdl-field entity="FactorySupply" indices="New York,January"></vdl-field>
                            <vdl-button vdl-event="click:actions.update_Ent" label="Update"></vdl-button>
                        </vdl-form>
                    </vdl-column>
                </vdl-row>
            </vdl-section>
        </vdl-page>

## Remove Array Value

The `vdl-remove-entity` option can be used with an array to remove the value at a specified position in the array.

Code editor

        <vdl-page>
            <vdl-header draggable="true">
                <vdl-action-group draggable="true" name="remove_Ent">
                    <vdl-action-remove-entity
                    entity="FactorySupply"
                    value="=scenario.entities.FactorySupply(['New York', 'January']).value + 1"
                    scenario="0"
                    indices="=['New York', 'January']">
                    </vdl-action-remove-entity>
                </vdl-action-group>
            </vdl-header>
            <vdl-section heading="VDL Entity 4">
                <vdl-row>
                    <vdl-column size="12">
                        <vdl-form>
                            <vdl-field entity="FactorySupply" indices="New York,January"></vdl-field>
                            <vdl-button vdl-event="click:actions.remove_Ent" label="Remove"></vdl-button>
                        </vdl-form>
                    </vdl-column>
                </vdl-row>
            </vdl-section>
        </vdl-page>

## Update Parameter

The following example uses a vdl action attached to a Button to update the parameter MyParam (displayed in a vdl field) with a randomly generated number.

Code editor

    <vdl-action-group name="demo3">
        <vdl-action-update-entity parameter="MyParam" value="=Math.random() + ''" scenario="0" ></vdl-action-update-entity>
    </vdl-action-group>
    <vdl-form>
        <vdl-field parameter="MyParam" ></vdl-field>
    </vdl-form>
    <button class="btn-primary" vdl-event="click:actions.demo3">Demo3</button>

## Remove Param Value

The `vdl-remove-entity` action can be used to delete a parameter.

Code editor

    <vdl-action-group name="demo4">
        <vdl-action-remove-entity parameter="MyParam" scenario="0"></vdl-action-remove-entity>
    </vdl-action-group>
    <vdl-form>
        <vdl-field parameter="MyParam"></vdl-field>
    </vdl-form>
    <button class="btn-primary" vdl-event="click:actions.demo4">Remove parameter MyParam</button>

## Remove Set Value

The `vdl remove entity` action can be used to delete a set of data.

Code editor

    <vdl-action-group name="demo4">
     <vdl-action-remove-entity set="Factories" indices="='New York'" scenario="0"></vdl-action-remove-entity>
     </vdl-action-group>
     <vdl-form>
     <i vdl-repeat="=item in scenario.entities.Factories" vdl-text="=item.label + ' '"></i>
     </vdl-form>
     <button class="btn-primary" vdl-event="click:actions.demo4">Remove New York factory</button>

Parent Topic VDL Actions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.