question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support "parentpanel" in expression for nested dynamic panels

See original GitHub issue

If there is a nested dynamic panel (dynamic panel inside another dynamic panel), then to access values in expression from the parent panel can by using “parentpanel” prefix. Here is the JSON example. “child_question1” becomes visible when an user set any value into checkbox_root question and child_question2 shows choices that selected in checkbox_root.

{
      elements: [
        {
          type: "paneldynamic",
          name: "rootPanel",
          panelCount: 1,
          templateElements: [
            {
              type: "checkbox",
              name: "checkbox_root",
              choices: ["item1", "item2", "item3"],
            },
            {
              type: "paneldynamic",
              name: "childPanel",
              minPanelCount: 1,
              templateElements: [
                {
                  type: "text",
                  name: "child_question1",
                 visibleIf: "{parentpanel.checkbox_root} notempty"
                },
                {
                  type: "checkbox",
                  name: "child_question2",
                  hideIfChoicesEmpty: true,
                  choicesVisibleIf: "{parentpanel.checkbox_root} contains {item}",
                  choices: ["item1", "item2", "item3"],
                }
              ]
            }
          ]
        }
      ]
    }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewtelnovcommented, Dec 3, 2021

@masciugo I have fixed the issue by the commit above. {panel.region} will work for your example.

Thank you, Andrew

1reaction
andrewtelnovcommented, Nov 29, 2021

@masciugo In your case the following example should work. Unfortunately, it doesn’t. I will take a look.

Thank you, Andrew

Read more comments on GitHub >

github_iconTop Results From Across the Web

When I have nested panel dynamics in a survey how are the ...
Hello, If you are talking about expressions or text processing then you can access parent panel as "{parentPanel.yourQuestionInParentPanel}". It ...
Read more >
Nested Dynamic Panels with Fit to Content - Axure RP 8
I've got a situation kind of like nested accordions - I've got a dynamic panel set to Fit to Content which pushes widgets...
Read more >
Panels Overview - WPF .NET Framework - Microsoft Learn
All Panel elements support the base sizing and positioning properties defined by ... of child elements hosted within the parent Panel.
Read more >
PanelModel | SurveyJS
A class that describes the Panel container element. A panel can contain questions and other panels. Refer to the following help topic for...
Read more >
Get Nested Output Dynamically in Azure Data Factory
I want to build an expression in ADF via concatenation, then evaluate the nested expression. Basically, I have a Web Activity which is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found