Description
Return listed according to exact membership and displayIndex from zero-based indexOf.
Survey display order, self-description, missingness, and record support are distinct research properties. Literal tokens and counts can preserve those distinctions without inferring a person's identity, preferences, or the meaning of an unprovided response.
Return listed according to exact membership and displayIndex from zero-based indexOf.
When to use this tool
Use Self Report Category Display Index when you need a transparent survey-record, display-order, or time-use calculation.
How to use the tool and how it works
- Enter category, suppliedOrder. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read listed, displayIndex. Inspect listed before interpreting the associated values.
Require unique labels in suppliedOrder. Return listed according to exact membership and displayIndex from zero-based indexOf.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| category | Category | Required. Text; maximum UTF-16 length 8192. |
| suppliedOrder | Supplied Order | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| listed | Listed | Required. Boolean. |
| displayIndex | Display Index | Required. Safe integer. |
{
"input": {
"category": "self-described",
"suppliedOrder": [
"declined",
"self-described"
]
},
"output": {
"listed": true,
"displayIndex": 1
}
} Limitations and assumptions
- An unlisted category returns -1. The caller supplies a display order; the tool does not infer identity, rank categories, or prescribe an official vocabulary.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use the study's consent, vocabulary, missingness, and disclosure methodology for interpretation. Retain self-described information and assess sampling and privacy separately from local record arithmetic.
References
Similar or alternative tools
- Self Report Option Position Gap
Find selectedLabel in each using zero-based indexes, return knownInBoth, and compute second minus first position only when both contain it.
- Survey Self Description Missingness
For each response, optionally apply JavaScript trim before comparing it exactly with the supplied missingTokens.