Eksempler
The built-in example
Du skriver inn
- Rader
- Need speed? | Choose the faster option | Within budget?
Within budget? | Choose the faster option | Find another option
Du får
- Veier
- Need speed?: Yes → Choose the faster option; Need speed?: No → Within budget?: Yes → Choose the faster option; Need speed?: No → Within budget?: No → Find another option
The No answer of the first question is the exact text of the second question, so the tree continues there. Two questions with two answers each give three finished paths.
Kjørt med verktøyets egen kode.
Rain and cold
Du skriver inn
- Rader
- Is it raining? | Take an umbrella | Is it cold?
Is it cold? | Wear a coat | Wear a T-shirt
Du får
- Veier
- Is it raining?: Yes → Take an umbrella; Is it raining?: No → Is it cold?: Yes → Wear a coat; Is it raining?: No → Is it cold?: No → Wear a T-shirt
A Yes on the first question ends at once. A No leads to the second question, which splits again. The path list spells out each route in plain words.
Kjørt med verktøyets egen kode.
A row that is not connected
Du skriver inn
- Rader
- A? | yes | no
B? | yes | no
Du får
- Melding
- Connect every decision to the first question or remove unused rows.
Nothing in the first row points to B?, so that row can never be reached. The tool asks you to link it from the first question or delete it.
Kjørt med verktøyets egen kode.
Questions that point at each other
Du skriver inn
- Rader
- A? | B? | stop
B? | A? | stop
Du får
- Melding
- The decision tree contains a cycle.
A? leads to B?, and B? leads back to A?, so the tree would never end. Loops are not allowed, so the tool stops with an error.
Kjørt med verktøyets egen kode.