A single dynamic array contains different line formats in the same dynamic array, like:
lines including external variables
lines with only collected variables
summary line (mainly total)
Stakeholders
This case is common in main business surveys : Esa, Ofats...
Current DDI
Current structure of a dynamic array with only collected variables:
<d:QuestionGrid>
<d:GridDimension rank="1">
<d:Roster minimumRequired="_minLines_" maximumAllowed="_maxLines_"/>
</d:GridDimension>
<d:GridDimension rank="2">
<d:CodeDomain>Référence à une liste de codes</d:CodeDomain>
</d:GridDimension>
<d:StructuredMixedGridResponseDomain> // qui contient une liste de :
<d:GridResponseDomainInMixed>
<d:ResponseDomain>Contenu qui dépend du format de la réponse</d:ResponseDomain>
<d:GridAttachment>
<d:CellCoordinatesAsDefined>
<d:SelectDimension rank="1" rangeMinimum="1" rangeMaximum="1"/>
<d:SelectDimension rank="2" rangeMinimum="_columnNumber_" rangeMaximum="_columnNumber_"/>
</d:CellCoordinatesAsDefined>
</d:GridAttachment>
</d:GridResponseDomainInMixed>
</d:StructuredMixedGridResponseDomain>
</d:QuestionGrid>
If minLines is inferior to maxLines, there is a "Add a line" button. We could personalize its label with the same d:Instruction we would use for a Loop occurrence (d:InstructionName = Loop.Add).
The columnNumber depends on the Response. Each Response is on the line number 1.
When the response is replaced by a label, the d:QuestionGrid/d:StructuredMixedGridResponseDomain/d:GridResponseDomainInMixed is replaced by:
For the summary line, there would be 0 Response, only NoDataByDefinition with label... The Roster would have minLines = maxLines = 1.
Proposal
To explain that the different types of dynamic arrays have to be merged, I would use a QuestionGroup to indicate that all these QuestionGrid are together, with TypeOfQuestionGroup = "MergedDynamicArray" to clarify it.
I don't know how to manage properly the fact that designers what to collect the same variable for the personalized lines and the added ones.
One solution is to tell them that the variables are différent: the value of known products is not the same variable as the value of new products. The previous elements would be enough.
Complement / Alternative
Alternative for columns with external or collected values to have only 1 variable in always collected columns.
Another way is to manage Filter inside QuestionGrid.
When it is possible to directly fill a response with an external variable, there would be a filtered Response and a CellLabel. The CellLabel and the Response would have opposite conditions depending on the origin of the collected variable (external or really collected)
Business case
A single dynamic array contains different line formats in the same dynamic array, like:
Stakeholders
This case is common in main business surveys : Esa, Ofats...
Current DDI
Current structure of a dynamic array with only collected variables:
If minLines is inferior to maxLines, there is a "Add a line" button. We could personalize its label with the same d:Instruction we would use for a Loop occurrence (d:InstructionName = Loop.Add).
The columnNumber depends on the Response. Each Response is on the line number 1.
When the response is replaced by a label, the d:QuestionGrid/d:StructuredMixedGridResponseDomain/d:GridResponseDomainInMixed is replaced by:
Which indicates that there is no Response between columns firstColumn and lastColumn and merges the cells if these values are different +
Which defines the label of the cell.
For the summary line, there would be 0 Response, only NoDataByDefinition with label... The Roster would have minLines = maxLines = 1.
Proposal
To explain that the different types of dynamic arrays have to be merged, I would use a QuestionGroup to indicate that all these QuestionGrid are together, with TypeOfQuestionGroup = "MergedDynamicArray" to clarify it.
I don't know how to manage properly the fact that designers what to collect the same variable for the personalized lines and the added ones. One solution is to tell them that the variables are différent: the value of known products is not the same variable as the value of new products. The previous elements would be enough.
Complement / Alternative
Alternative for columns with external or collected values to have only 1 variable in always collected columns.
Another way is to manage Filter inside QuestionGrid. When it is possible to directly fill a response with an external variable, there would be a filtered Response and a CellLabel. The CellLabel and the Response would have opposite conditions depending on the origin of the collected variable (external or really collected)