Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |
| csranks [2024/09/10 14:44] – [oxford] admin | csranks [2025/02/15 09:38] (current) – [otherSortArr] admin |
|---|
| 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']}); |