Initializing help system before first use

# Variable Editing with VDL Actions

Variables can be incremented using a button.

## Set a Value Using a Dynamic Expression Increment a Value

This example shows a VDL Action that increments a counter value, held in a `vdl-var`, by 1 each time a button is clicked—The button calls the `increment.counter` VDL Action group.

View Designer
Code editor

        <vdl-page>
            <vdl-section heading="Execute Button">
                <vdl-row>
                    <vdl-column>
                        <vdl-var name="counter" value="=1"></vdl-var>
                        <vdl-action-group name="incrementCounter">
                            <vdl-action-set-var var="counter" value="=vars.counter + 1"></vdl-action-set-var>
                        </vdl-action-group>
                        <button vdl-event="click:actions.incrementCounter">Increment Counter</button>
                        <span vdl-text="=vars.counter"></span>
                    </vdl-column>
                </vdl-row>
            </vdl-section>
        </vdl-page>

The action attached to this button changes the text value attached to the `ButtonValue` var, which is used as the label for the Button.

        <vdl-page>
            <vdl-section heading="Increment">
                <vdl-row>
                    <vdl-column>
                        <vdl-var name="ButtonValue" value="Initial"></vdl-var>
                        <vdl-action-group name="updateButtonValue">
                            <vdl-action-set-var var="ButtonValue" value="=value"></vdl-action-set-var>
                        </vdl-action-group>
                        <button vdl-event="click:actions.updateButtonValue" value="Updated">Update</button>
                        <button vdl-event="click:actions.updateButtonValue" value="Initial">Reset</button>
                        <span vdl-text="=vars.ButtonValue"></span>
                    </vdl-column>
                </vdl-row>
            </vdl-section>
        </vdl-page>

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.