Creating a Means of Navigation

Most KnowledgeKube applications consist of more than one question group. To allow users to navigate between groups, you will need to implement expressions capable of switching from one group to another.

You can do this with the ShowForm function, which takes the keyword of the intended question group as its sole argument.

ShowForm( "AnotherQuestionGroup" );

If the expression above is added to a Button, clicking that button will redirect the end user to a question group with the keyword AnotherQuestionGroup, if it exists. If the group does not exist, the function will have no effect.

As with all functions, you can call ShowForm within larger expressions in order to apply additional logic. For example, you might have an optional question group that you only want the user to see if they have selected a specific response to a particular question.

Let's say you want to know whether the user has any pets and, if so, you want to ask them a series of questions about those pets; if not, you want to skip those questions and proceed to the next mandatory question group. To do this, you could use an expression like the one shown below:

If:( UserHasPets = 1 )
{
	ShowForm( "PetDetailCapture" );
}
Else
{
	ShowForm( "AnotherQuestionGroup" );
}