Description
Compare response exactly with each, returning opted-out, missing, or self-described; retain the response only for the last state and otherwise return an empty string.
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.
Compare response exactly with each, returning opted-out, missing, or self-described; retain the response only for the last state and otherwise return an empty string.
When to use this tool
Use Survey Self Description Opt Out Distinction when you need a transparent survey-record, display-order, or time-use calculation.
How to use the tool and how it works
- Enter response, optOutToken, missingToken. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read status, retainedResponse. Use the output convention below.
Require distinct optOutToken and missingToken. Compare response exactly with each, returning opted-out, missing, or self-described; retain the response only for the last state and otherwise return an empty string.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| response | Response | Required. Text; maximum UTF-16 length 8192. |
| optOutToken | Opt Out Token | Required. Text; maximum UTF-16 length 8192. |
| missingToken | Missing Token | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| status | Status | Required. Text; maximum UTF-16 length 8192. |
| retainedResponse | Retained Response | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"response": "prefer not to say",
"optOutToken": "prefer not to say",
"missingToken": ""
},
"output": {
"status": "opted-out",
"retainedResponse": ""
}
} Limitations and assumptions
- No trimming, case folding, or identity inference occurs. The retained empty string is a placeholder for two statuses and can also be an actual self-description if tokens permit; read status alongside it.
- 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
- Survey Self Description Missingness
For each response, optionally apply JavaScript trim before comparing it exactly with the supplied missingTokens.
- Self Report Category Display Index
Return listed according to exact membership and displayIndex from zero-based indexOf.