Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Movilizer - Menu Item in a Complex UI Navigation not working properly?

I'm trying to create a Complex UI consisting of a Menu Item screen (type="6") at the top and a Text Input Screen (type="5") below. I want the Menu Item Screen to go to another screen than the Text Item Screen, though I have to put the Text Item Screen in the nextQuestionKey attribute.

I tried it with a restriction in the Menu Item Screen as shown in the code below, but the validator tells me "Branching is not allowed."

I tried moving the restriction to the Text Input Screen. There the validator tells me that "A menu screen in a complex screen which is not at the end must provide a valid, pre-defined forward navigation answer of attributeType=72"

<question key="15" type="6" backNavigationAllowed="true" sortAnswersByClientKey="false">
    <answer key="15_1" nextQuestionKey="16" clientKey="CK#15">
        <text>Scan barcode</text>
    </answer>
    <restriction nextQuestionKey="17" position="0">
        <condition>getAnswerValueByClientKey($answer:"15_1", "CK#15") != ""</condition>
    </restriction>
    <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="0" gridPosX="0" gridPosY="0" gridWidth="1" gridHeight="1" linearHeight="1" groupTitle="Input Asset number"/>
</question>

<question key="16" type="5" backNavigationAllowed="true" sortAnswersByClientKey="false">
    <answer key="16_1" nextQuestionKey="18" clientKey="CK#16" columnSizeType="ROWS">
        <text>Enter barcode manually</text>
    </answer>
    <answer key="16_2" nextQuestionKey="18" clientKey="CK#16" columnSizeType="ROWS">
        <text>Reason</text>
    </answer>
    <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="1" gridPosX="0" gridPosY="1" gridWidth="1" gridHeight="1" linearHeight="1"/>
</question>

I would appreciate if someone could help me find a solution to this problem.

like image 332
Mike Limburg Avatar asked Oct 19 '22 15:10

Mike Limburg


1 Answers

I think the easiest way to achieve this is to change the sequence of screens so the Text Item screen points to the Menu screen. In the Complex UI you can still display the menu on top if you want, so the sequence for the navigation has no impact on that. In the Menu screen you define a default answer to point to question key 18 ... the clickable answer in the menu screen points to question 17.

For the default answer feature see: https://devtools.movilizer.com/confluence/display/DOC22/Default+Answer+feature+for+Image+Menu+screens

<question key="15" type="5" backNavigationAllowed="true" sortAnswersByClientKey="false">
  <answer key="15_1" nextQuestionKey="16" clientKey="CK#16" columnSizeType="ROWS">
    <text>Enter barcode manually</text>
  </answer>
  <answer key="15_2" nextQuestionKey="16" clientKey="CK#16" columnSizeType="ROWS">
    <text>Reason</text>
  </answer>
  <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="1" gridPosX="0" gridPosY="1" gridWidth="1" gridHeight="1" linearHeight="1"/>
</question>

<question key="16" type="6" backNavigationAllowed="true" sortAnswersByClientKey="false">
  <answer key="16_1" nextQuestionKey="17" clientKey="CK#17">
    <text>Scan barcode</text>
  </answer>
  <answer key="16_2" nextQuestionKey="18" clientKey="CK#18" attributeType="72">
    <text>default answer</text>
    <predefinedValue>X</predefinedValue>
  </answer>
  <complex linearGroupId="InputAssetNumber" gridGroupId="InputAssetNumber" linearInnerScrollbar="false" gridInnerScrollbar="false" gridHorizontalLayout="false" linearPos="0" gridPosX="0" gridPosY="0" gridWidth="1" gridHeight="1" linearHeight="1" groupTitle="Input Asset number"/>
</question>

This means that initially the complex UI will display an OK button. If the user presses the OK button, the client navigates to question 18. If the user prsses the Scan barcode button, the client navigates to question 17.

like image 54
André Schäfer Avatar answered Oct 22 '22 23:10

André Schäfer