Variables: summarizing user input in the form

What you'll be learning:

  • how to declare and set helper variables in your form to store values

  • how to add and manage new controls: barview, datepicker, signature, and barcodereader

In this section, you'll finish up the Vehicle Inspection form, adding the finishing touches to your creation.

Rest assured, there'll be a lot of new controls for you to sink your teeth into. The intriguing problem though is that according to the Rocky Jupiter specs for the Vehicle Inspection form, it should feature an automatically updating running total of how many car parts the driver has found to be operational, and how many are malfunctioning.

A barview control displaying a running total of operational and malfunctioning parts

Figure 97. A barview control displaying a running total of operational and malfunctioning parts


To pull this off, you'll have to insert some sort of counter into the repeater that generates the segmentedbutton controls, that keeps track of how the user input in them. Instead of just summing the counters and displaying a total, you'll use a barview control to display the values; an exciting proposition in itself, you'll agree.