Question T15118
Visible to All Users

Row is repeating in dynamic matrix in survey pdf

created a year ago (modified a year ago)

Hi Team,

Can you please help me to understand why row is getting repeated in below sample, even if there is just one object in defaultValues?

Please have look on json.ts =>

"653834_Match Details" - For this element its working fine, 2 rows are showing as we have 2 objects in default values,
"650732_NonCompliantWBSData" - Here for 1 object its showing 2 rows?

https://codesandbox.io/s/surveyjs-angular-forked-m5j5qk?file=/src/app/components/json.ts:77-111

Comments (1)

    Hi Team,

    Can you please have a look on it asap?

    Answers approved by surveyjs Support

    created a year ago

    Hello Santosh,
    Your 650732_NonCompliantWBSData matrix has default values defined for matrix columns. By default, the rowCount property is set to 2. Therefore, a matrix displays two rows (default) with default column values. Depending on your task, you may wish to reset default column values. Also, adjust the number of predefined matrix rows using the rowCount property of a Dynamic Matrix question.

    Should you have any questions, we are always here to help.

      Show previous comments (1)

        Hello Santosh,
        Thank you for the update. In the 653834_Match Details matrix, you define the defaultValue property. The defaultValue defines the initial configuration of a matrix. Therefore, you can configure the defaultValue property for your 650732_NonCompliantWBSData matrix and predefine the number of rows and their values for it.

        Should you have any questions or require further assistance, I'll be happy to follow.

        Thanks

          Thanks Jane, We are good on it!

          Just one query, Even we are passing row based condition in visibleIf property of dynamic matrix, why column is getting printed in survey pdf, if condition is false

          surveyjs-angular (forked) - CodeSandbox

            Hello Santosh,
            You're always welcome. To process your additional inquiry in the most efficient manner, I created a separate ticket on your behalf: T15188: Dynamic matrix rows hidden by a visibleIf condition are exported to PDF. We placed it in our processing queue and will process it shortly.