User Tools

Site Tools


csranks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
csranks [2024/05/29 16:16] admincsranks [2025/02/15 09:38] (current) – [otherSortArr] admin
Line 11: Line 11:
   * Supports two modes: allow ties or break ties   * Supports two modes: allow ties or break ties
   * Supports tie breaking based on question randomization or one or more of these other choice fields: text, id, variable name, html, or recode. Other choices fields can be sorted ascending or descending for tie breaking purposes.     * Supports tie breaking based on question randomization or one or more of these other choice fields: text, id, variable name, html, or recode. Other choices fields can be sorted ascending or descending for tie breaking purposes.  
-  * Saves labels of choices to embedded data fields. Labels can be saved as HTML, text only, or variable names.+  * Saves labels of choices to embedded data fields. Labels can be saved as HTML, text only, variable names, or entered text.
   * Saves values of choices to embedded data fields.   * Saves values of choices to embedded data fields.
   * Ranked items can be piped on the next page - no additional questions, blocks, or survey flow logic needed.   * Ranked items can be piped on the next page - no additional questions, blocks, or survey flow logic needed.
Line 80: Line 80:
 Default: %%"last"%% Default: %%"last"%%
 ==== otherSortArr ==== ==== otherSortArr ====
-**otherSortArr** is an array used to specify the fields used for tie breaking. It also specifies to order of combined labels when **[[csranks#allowTies|allowTies]]** is true. An empty array (the default) means ties will be broken based on the randomized order of the choices in the question. If other fields are specified, they should be specified by field name in priority order. Add a minus sign (-) in front of the field name to specify descending order. Available fields (case sensitive) are: Text, id, VariableName, html, and Recode. For example, to specify a tie breaker of descending recode followed by choice text, the function would be called like this:+**otherSortArr** is an array used to specify the fields used for tie breaking. It also specifies the order of combined labels when **[[csranks#allowTies|allowTies]]** is true. An empty array (the default) means ties will be broken based on the randomized order of the choices in the question. If other fields are specified, they should be specified by field name in priority order. Add a minus sign (-) in front of the field name to specify descending order. Available fields (case sensitive) are: Text, id, VariableName, html, and Recode. For example, to specify a tie breaker of descending recode followed by choice text, the function would be called like this:
 <code> <code>
 csRanks(this,{otherSortArr:['-Recode','Text']}); csRanks(this,{otherSortArr:['-Recode','Text']});
Line 87: Line 87:
 Default: [] Default: []
 ==== oxford ==== ==== oxford ====
-**oxford** is text used before **[[csranks#and|and]]** when **[[csranks#allowTies|allowTies]]** is true and three or more labels are joined. In the text "Item1, Item2, and Item3" the comma before "and" is called an Oxford comma. Change **oxford** to "" to remove the Oxford comma. +**oxford** is text used before **[[csranks#and|and]]** when **[[csranks#allowTies|allowTies]]** is true and three or more labels are joined. In the text "Item1, Item2, and Item3" the comma before "and" is called an Oxford comma. Change **oxford** to %%""%% to remove the Oxford comma. 
  
 Default: %%","%% Default: %%","%%
csranks.1717013793.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki