Hello. Is there any way to copy values from dynamic panel D (which has 1 input field and 3 initial panels in this example) to dynamic panel C? Panel C should create panel for each panel in panel D.
Question
T15214
Visible to All Users
Hello,
From what I gather, you wish to summaries all panels added to Dynamic Panel D panels (e.g., 3 + 3) and create 6 panels within the Dynamic Panel 6. Is that correct?
Correct. Also panel B count should be 10 (In this case we could use simple panel x10 if it would make it easier). And panel D count could be 0 to n in each panel. While panel C count should always be sum of Dynamic Panel D panels.
Hello Saulius,
Thank you for the update. Unfortunately, a survey doesn't have an option to convert a multi-dimension array, which are built from the Dynamic Panel placed within a Dynamic Panel (Panel B -> Panel D) into a two-dimensional array which is Panel C placed within Panel A.
As an option, you can handle this programmatically. For instance, subscribe to the survey.onPanelAdded and survey.onPanelRemoved events to handle Panel D panel adding and removing. When this happens, programmatically create or remove panels for the Panel C question using the QuestionPanelDynamicModel.addPanelUI and QuestionPanelDynamicModel.removePanelUI functions.
Should you have any further questions, we are here to help.
Thanks
Hello. You suggested to use survey.onPanelAdded event. But this event is raised when a new panel is added to a page. I need event to be triggered when new panel is added to a Dynamic Panel question. Would it be better to use: onDynamicPanelAdded?
Hello,
Thank you for the update. Yes, you're right. Please accept my apologies for the oversight. Please use the
onDynamicPanelAdded
/onDynamicPanelRemoved
events to manage panels.Please let me know if you have any questions.