Loading...

Inferred Values

Form Based Worksheets allow clients to type in answers, check checkboxes, choose options, and so on.  The act of doing this is the stuff of generating data that can then be used in cool ways, like piping values into Metrics and for the computation of other values (e.g. a total score) in the Worksheet.

This is all the stuff of figuring out a number value from something a client fills out in your Worksheet.

So this sometimes begs the question: what would be the number value of filling out this or that?

An explicit number in the typed or selected answer is obvious, but when that's not present, CA will infer a number value.

Let’s look at the full set of rules by which this works, broken down by input type:


Simple Text

Simple text boxes glean their number from whatever is typed in.  If it’s not just a number (but instead contains some other, non-numeric text) the system will try to pluck a number out of whatever was typed.  For example if your client types “I ran 12 miles!” CA will pull out 12 as the number value.  If they type “I ran twelve miles!” then well, sorry: I hereby confess the dirty secret, that CA doesn’t actually speak English.

No numeric value to be found?  That will give an inferred number value of zero.


Multi-Line Text Boxes

As a form input usually reserved for for free-flowing written answers, multi-line text boxes would usually be a poor fit for getting some sort of number out for the purposes of a Metric.  But there is one use case that fits nicely: if you are prompting folks to type in a list of something, when how many items in that list is a useful number.

For example:
pipemetrics_-_multi_line.png

In this case if you hooked this input up to a Metric, the above answer would give an inferred number value of 3.


Dropdown Menus

12.-dropdown.png
With dropdown menus the system will first-and-foremost try to grab a number out of the option that was chosen.  In the example above, 8 is a clear winner.

If a number cannot be pulled from the text of the chosen option, CA will mark down WHICH option was chosen relative to the ordering of all options presented.  In other words, if the first option is chosen that’s a 1, if the second option is chosen that’s a 2, and so on.



Check boxes

Take a look at the following two examples, and see if you can guess what CA would assign for each:
13.-checkboxes.png

For the fruits question, 4 of the boxes are checked and so that would give an inferred number value of 4.

In the second one, there are numbers present in each of the options, so CA will use those to add up a total value for the collection of check boxes, counting only those boxes that have been checked.  So it would compute as 5 + 30 + -2 = 33 total.

In case you were wondering, if some check boxes have a number in them and others don’t, the number will be used when present and otherwise a checked check box will contribute a one.  So yeah, feel free to mix-and-match.


Radio Buttons

Again, see the following examples and guess:
14.-radio-buttons.png

The first set of radio buttons lacks anything numeric, so the index of the chosen item is what would be piped into a Metric.  In this case “Good” is the 4th option, so it would be a 4.

The second set of radio buttons has numbers in the option, so here CA gloms on to those numbers.  In this case 5 would be the Metric value, even through it’s the 3rd option.


Image Prompt

This is a bit of a far fetched thing to get a number from, but in the interest of completion, why not?!

Image prompts allow up to whatever max number of images you set to be uploaded by your client.  The number value will be the number of images actually uploaded.

Signature Area

This is definitely a far fetched thing to get a number from, so these are always a zero. :)