Data Piping and Ordinals

When you are referencing a choice using data piping, it is important to use the Ordinal position and not it's value.
Reference Guide
When you create a choice question, every choice will be provided with a value, sometimes called a weighting. You can explicitly provide a value by including the text of the choice and its value separated by vertical bar. If you don't explicitly provide a choice with a value, the system will allocate values, starting at 1 and incrementing for each additional value.
Data Piping Values and Ordinals
You can see the values associated with a series of choices by editing the question. In the image below the choice "Changing consumer preferences" has a value of 4.
Data Piping Values and Ordinals
When you then refer to this question and these choices using data piping, in a question on a future page, you would use its data access code.

For a Single Selection Question, you would return the single choice that is selected. For a Multiple Selection Question, you would return a list of the choices selected.

For example, if the data access code was "Q6", then the appropriate data piping code would be be as follows:-
Data Piping Values and Ordinals
When used in the live survey it could appear like this:
Data Piping Values and Ordinals
However, Data Piping also allows a range of options to return an individual choice, along with various formatting options.

If you want to return a single choice and its text, you need to include a reference to the choice itself. This reference is called a sub code and is the ordinal position of the choice in the natural order of the choices.

It is not the value of the choice but the position it holds in the natural order of all choices. That is because it is possible to have the same value for multiple choices. To reference a single choice, include the data piping code and all the ordinal position of the choice, separated by a colon. For example:
Data Piping Values and Ordinals
The example above refers to the choice that is in ordinal position 12 from the list of choices. In our question, that is "Other (Please Specify)". Whilst that choice has a value of 10, its ordinal position is 12.
When used in a live survey, the specified value of the choice would be entered at Question 6
Data Piping Values and Ordinals
and then when referenced in a live survey, via its data piping symbol and using the choice ordinal of 12, the following would show:
Data Piping Values and Ordinals
More information on Data Piping is available in our Data Piping Reference.