<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/discussions/f/data/29197/expand-collapse-rows-within-an-expanded-collapse-row</link><description>Has any one done an expanded/collapse row grid within an expanded/collapse row grid. I am looking at the https://docs.appian.com/suite/help/23.2/recipe-expand-collapse-rows-in-a-tree-grid.html#expression 
 in the documentation and it look like what I</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115673?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 20:47:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ad3c58ff-4c50-4b7e-bd86-0e3aab4765c4</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;That did exactly what I was looking for.&amp;nbsp; Thanks a bunch Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115661?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 17:56:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a12f1f79-fee5-4ef5-9298-09be756b83b7</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;lol, thanks - well just let me know if you need any clarifications etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115658?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 17:38:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35889a63-f3b0-4cf6-934d-1899c08a7ab9</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;WOW, Mike, you are AMAZING!!!&amp;nbsp; Thank you so much. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115657?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 17:33:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:968e31c4-8d1d-4ca5-8dc6-0c0e06e31bbe</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Well for the sake of argument I&amp;#39;ve whipped you up a quick example using a probably-oversimplified local data structure, but which might at least help you solidify the necessary &amp;quot;skeleton&amp;quot; of the thing you&amp;#39;re trying to build...&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  
  local!nestedDataSet: {
    a!map(
      name: &amp;quot;Set 1&amp;quot;,
      contents: {
        a!map(
          itemName: &amp;quot;item a1&amp;quot;,
          features: {
            a!map(featureName: &amp;quot;feature q1&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature q2&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature q3&amp;quot;, widgetCount: tointeger(rand()*20)),
          }
        ),
        a!map(
          itemName: &amp;quot;item a2&amp;quot;,
          features: {
            a!map(featureName: &amp;quot;feature w1&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature w2&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature w3&amp;quot;, widgetCount: tointeger(rand()*20)),
          }
        ),
        a!map(
          itemName: &amp;quot;item a3&amp;quot;,
          features: {
            a!map(featureName: &amp;quot;feature e1&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature e2&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature e3&amp;quot;, widgetCount: tointeger(rand()*20)),
          }
        )
      }
    ),
    a!map(
      name: &amp;quot;Set 2&amp;quot;,
      contents: {
        a!map(
          itemName: &amp;quot;item b1&amp;quot;,
          features: {
            a!map(featureName: &amp;quot;feature r1&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature r2&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature r3&amp;quot;, widgetCount: tointeger(rand()*20)),
          }
        ),
        a!map(
          itemName: &amp;quot;item b2&amp;quot;,
          features: {
            a!map(featureName: &amp;quot;feature t1&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature t2&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature t3&amp;quot;, widgetCount: tointeger(rand()*20)),
          }
        ),
        a!map(
          itemName: &amp;quot;item b3&amp;quot;,
          features: {
            a!map(featureName: &amp;quot;feature y1&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature y2&amp;quot;, widgetCount: tointeger(rand()*20)),
            a!map(featureName: &amp;quot;feature y3&amp;quot;, widgetCount: tointeger(rand()*20)),
          }
        )
      }
    ),
  },
  
  a!sectionLayout(
    
    contents: {
      a!gridLayout(
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;Name&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Quantity&amp;quot;)
        },
        
        rows: a!forEach(
          local!nestedDataSet,
          
          a!localVariables(
            local!currentLevel1: fv!item,
            local!isCurrentLevelExpanded: false(),
            
            {
              a!gridRowLayout(
                contents: {
                  a!richTextDisplayField(
                    value: a!richTextItem(
                      text: fv!item.name,
                      link: a!dynamicLink(
                        saveInto: a!save(local!isCurrentLevelExpanded, not(local!isCurrentLevelExpanded))
                      ),
                      linkStyle: &amp;quot;STANDALONE&amp;quot;
                    )
                  ),
                  a!richTextDisplayField(value: &amp;quot;Items: &amp;quot; &amp;amp; length(fv!item.contents))
                }
              ),
              
              if(
                local!isCurrentLevelExpanded,
                
                a!forEach(
                  local!currentLevel1.contents,
                  a!localVariables(
                    local!currentLevel2: fv!item,
                    local!isCurrentChildLevelExpanded: false(),
                    {
                      a!gridRowLayout(
                        contents: {
                          a!richTextDisplayField(
                            value: {
                              &amp;quot; -  &amp;quot;,
                              a!richTextItem(
                                text: fv!item.itemName,
                                link: a!dynamicLink(
                                  saveInto: a!save(local!isCurrentChildLevelExpanded, not(local!isCurrentChildLevelExpanded))
                                )
                              )
                            }
                          ),
                          a!richTextDisplayField(
                            value: a!richTextItem(
                              text: &amp;quot;  Features: &amp;quot; &amp;amp; length(fv!item.features),
                              style: &amp;quot;EMPHASIS&amp;quot;
                            )
                          )
                        }
                      ),
                      
                      if(
                        local!isCurrentChildLevelExpanded,
                        a!forEach(
                          local!currentLevel2.features,
                          a!gridRowLayout(
                            contents: {
                              a!richTextDisplayField(
                                value: {
                                  &amp;quot; - -  &amp;quot;,
                                  a!richTextItem(
                                    text: fv!item.featureName,
                                    size: &amp;quot;SMALL&amp;quot;
                                  )
                                }
                              ),
                              a!richTextDisplayField(
                                value: a!richTextItem(
                                  text: &amp;quot;    Widget Count: &amp;quot; &amp;amp; fv!item.widgetCount,
                                  size: &amp;quot;SMALL&amp;quot;
                                )
                              )
                            }
                          )
                        ),
                        {}
                      )
                    }
                  )
                ),
                {}
              )
            }
          )
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1688578347518v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115655?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 16:53:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3de5038b-49b7-41bb-862d-918aebc8ef77</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;Thanks Mike.&amp;nbsp; Right now, I keep confusing myself more and more.&amp;nbsp; I seem to understand how layer 1 and layer 2 works, but seem to loose it when I attempt to add layer 3.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115646?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 14:41:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a2a93ce1-5d0b-4e7b-8c1b-b7915a1a0515</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Is there anything in particular you&amp;#39;re still having trouble with here, BTW?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115643?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 13:58:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0d60ab07-af9c-48f9-824e-2d9db372b67f</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;Thanks Stefan, I have actually been looking at the building-a-collapsible-tree.&amp;nbsp; By the way, I love your book, thank you for taking the time to write it and help us novice out.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115640?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 13:23:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:be00bcac-ac09-472f-9047-f2ebb15ff58b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You could turn this into a reusable and customizable component. Find some inspiration here&lt;/p&gt;
&lt;p&gt;&lt;a href="https://appian.rocks/2022/09/19/building-customisable-components/"&gt;https://appian.rocks/2022/09/19/building-customisable-components/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://appian.rocks/2022/10/03/building-a-collapsible-tree/"&gt;https://appian.rocks/2022/10/03/building-a-collapsible-tree/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115634?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 12:10:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd5691d1-804a-4479-a27e-d391ad1c0490</guid><dc:creator>AllenP</dc:creator><description>&lt;p&gt;Thanks Mike, I love the suggestion, I had not thought about doing that.&lt;/p&gt;
&lt;p&gt;I am working on working out the logic of the recipe to add my third layer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expand/Collapse Rows within an Expanded/Collapse Row</title><link>https://community.appian.com/thread/115479?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:28:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:72a41eaa-47b8-4f5a-bad5-df936e7ba291</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;It should be achievable following the same sort of logic as in that recipe - i don&amp;#39;t asusme there are any pre-set recipes offering an additional level of expansion, so my best guess is you&amp;#39;ll probably need to work out that logic on your own (though if you&amp;#39;re lucky, maybe someone here already has and can post some example code - i haven&amp;#39;t).&lt;/p&gt;
&lt;p&gt;One suggestion I could offer here is to write a specialized rule / sub-interface specifically to handle each parent-level grid row (where each iteration would return 1 set if it&amp;#39;s non-expanded, and additional sets if it has been expanded), as this sort of encapsulation might make it a little easier to work with in the context of your parent interface.&amp;nbsp; Though I believe it&amp;#39;s not a requirement, so you can probably accomplish this using whichever style ends up being easiest for you to work with.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>