Question T16673
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Get panelIndex

Referencing Dynamic Panel parent question from child Panel

created a year ago

I'm trying to reference a parent panel question from my child panel using the parentPanel.questionName syntax and it's not working. What am I doing wrong?

JSON
{ "logoPosition": "right", "pages": [ { "name": "page1", "elements": [ { "type": "paneldynamic", "name": "question1", "templateElements": [ { "type": "text", "name": "parentName" }, { "type": "panel", "name": "panel1", "elements": [ { "type": "text", "name": "question2", "title": "Parent {parentPanel.parentName}" } ] } ], "panelCount": 1 } ] } ] }

Answers approved by surveyjs Support

created a year ago

Hi Mary,
Thank you for sharing a survey JSON. If you wish to reference the value of the parentName input within the same panel, you can use the "{panel.}" prefix. Please consider the updated survey:

JSON
{ "logoPosition": "right", "pages": [ { "name": "page1", "elements": [ { "type": "paneldynamic", "name": "question1", "templateElements": [ { "type": "text", "name": "parentName" }, { "type": "panel", "name": "panel1", "elements": [ { "type": "text", "name": "question2", "title": "Parent {panel.parentName}" } ] } ], "panelCount": 1 } ] } ] }

Let me know if it works.

    Show previous comments (4)

      You really do have the best customer support! And I've already given you a glowing review to that effect, in case you were wondering. :-)

        It's a pleasure to hear this, Mary. Thank you so much. My team and I saw your review, and we really appreciate it.

        Should you have any further questions, please me us know.

        Have a great weekend!

          One more gnarly question coming your way, but I have complete confidence in the timeliness and quality of your answer!

          And you have a great weekend as well!