Add a tally counter to your form

Use this example to add a tally counter button to increment a numeric field.

This example shows how to add a tally counter to your form. It displays a button on the form that increments a numeric field when tapped.

For this to work, you will need a numeric field with the data name tally_count and a hyperlink field with the data name of increment.

Tally Counter

ON('click', 'increment', function(event) {
  // increment the numeric field by 1
  SETVALUE('tally_count', ($tally_count || 0) + 1);
});