Skip to content

Instantly share code, notes, and snippets.

@overcyn
Created March 31, 2021 19:30
Show Gist options
  • Select an option

  • Save overcyn/015ffc07051f572f4ed5d7f45127a00a to your computer and use it in GitHub Desktop.

Select an option

Save overcyn/015ffc07051f572f4ed5d7f45127a00a to your computer and use it in GitHub Desktop.
{
"type": "RKStudioNavigableOrderedTask",
"name": "Survey",
"identifier": "Survey",
"steps": [
{
"type": "QuestionStep",
"text": "Either Skip or Answer",
"title": "Navigation Rule #1",
"identifier": "New Step 1",
"answerFormat": {
"type": "TextAnswerFormat",
"multipleLines": false,
"keyboardType": "Text"
},
"optional": true,
"navigationRule": {
"type": "PredicateStepNavigationRule",
"resultPredicateDestinations": [
{
"type": "ResultPredicateDestination",
"destinationStepIdentifier": "skipped",
"resultPredicate": {
"resultIdentifier": "New Step 1",
"stepIdentifier": null,
"type": "NilQuestionResultPredicate"
}
},
{
"type": "ResultPredicateDestination",
"destinationStepIdentifier": "notskipped",
"resultPredicate": {
"type": "NotCompoundPredicate",
"subpredicate": {
"resultIdentifier": "New Step 1",
"stepIdentifier": null,
"type": "NilQuestionResultPredicate"
}
}
}
]
}
},
{
"type": "QuestionStep",
"text": "",
"title": "This should never be shown",
"identifier": "alwaysskipped",
"answerFormat": {
"type": "TextAnswerFormat",
"multipleLines": false,
"keyboardType": "Text"
},
"optional": false
},
{
"type": "InstructionStep",
"text": "",
"title": "You Skipped",
"identifier": "skipped",
"navigationRule": {
"type": "DirectStepNavigationRule",
"destinationStepIdentifier": "Second Check"
}
},
{
"type": "InstructionStep",
"text": "",
"title": "You Answered",
"identifier": "notskipped"
},
{
"type": "InstructionStep",
"text": "",
"title": "Navigation Rule #2",
"identifier": "Second Check",
"navigationRule": {
"type": "PredicateStepNavigationRule",
"resultPredicateDestinations": [
{
"type": "ResultPredicateDestination",
"destinationStepIdentifier": "New Step 7",
"resultPredicate": {
"resultIdentifier": "alwaysskipped",
"stepIdentifier": null,
"type": "NilQuestionResultPredicate"
}
}
]
}
},
{
"type": "InstructionStep",
"text": "",
"title": "This should never be shown",
"identifier": "This should never be shown"
},
{
"type": "InstructionStep",
"text": "",
"title": "Success!",
"identifier": "New Step 7"
},
{
"type": "InstructionStep",
"text": "",
"title": "Navigation Rule #3",
"identifier": "New Step 8"
},
{
"type": "InstructionStep",
"text": "",
"title": "This should never be shown",
"identifier": "New Step 9",
"skipNavigationRule": {
"type": "PredicateSkipStepNavigationRule",
"resultPredicate": {
"resultIdentifier": "alwaysskipped",
"stepIdentifier": null,
"type": "NilQuestionResultPredicate"
}
}
},
{
"type": "InstructionStep",
"text": "",
"title": "Success!",
"identifier": "New Step 10"
}
],
"styles": {
"progressBarColor": "#5381c3",
"nextButtonBackgroundColor": "#5381c3",
"nextButtonTextColor": "#FFFFFF"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment