<?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>Selectable rows in tree grid</title><link>https://community.appian.com/discussions/f/general/24908/selectable-rows-in-tree-grid</link><description>Hello! 
 I&amp;#39;m trying to implement a tree grid using the gridlayout() component in an Interface. I&amp;#39;ve been able to make it hierarchical (Once you click on a row, new subrows appear just under it) with loops and local variables to show or hide those subrows</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Selectable rows in tree grid</title><link>https://community.appian.com/thread/96398?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2022 16:16:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7186b433-88a7-4e03-922e-1b5bd5c0d701</guid><dc:creator>franciscoalfonson0001</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;to get the subrows to appear, I also used the values of the previous keys so, for example, to get the values for the 5th level, the logic included the values of the 4 previous ones.&lt;/p&gt;
&lt;p&gt;I intended to use the Id system I wrote before because if I could get to the Ids of the rows, I&amp;#39;d just search all the Ids that started with the Id of the row I selected.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also thought about using the element itself as an id, but I wouldn&amp;#39;t be able to use the same logic that I applied to get the subrows (as it used the values of the previous values as well)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable rows in tree grid</title><link>https://community.appian.com/thread/96397?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2022 15:59:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec747150-b036-46ed-9e83-1306dcd18aec</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;So, when you expand a top level item, you implemented some logic to find the child items. I suggest to use a similar logic for adding the IDs to the selected items for selection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable rows in tree grid</title><link>https://community.appian.com/thread/96396?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2022 15:40:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0dd389a7-abbb-46fc-ac89-67ad60647d76</guid><dc:creator>franciscoalfonson0001</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve assigned an unique id to every row in the grid (&amp;quot;(Value in first key)-(Value in second key)-...&amp;quot;). I&amp;#39;ve also made a &amp;quot;Begin with&amp;quot; rule to&amp;nbsp;find all elements in an array that start with a particular string. Is there any way to get all the ids of the grid rows? Or is there another way to approach the situation to make the &amp;quot;hierarchical selection&amp;quot; possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable rows in tree grid</title><link>https://community.appian.com/thread/96390?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2022 12:52:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1dd5539c-8ed8-443b-a3ab-d643f225d344</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I assume that you use the OOTB selection feature of the grid. Each row has a unique ID, adding this ID to the selectionValue parameter of the grid will make these rows selected.&lt;/p&gt;
&lt;p&gt;Now, with some logic in the selectionSaveInto, you should be able to add all sub-rows on selection of a&amp;nbsp;parent row.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable rows in tree grid</title><link>https://community.appian.com/thread/96389?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2022 11:07:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:398031c1-d0ae-4648-a501-d7a164d9e8b7</guid><dc:creator>franciscoalfonson0001</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rows: {
      a!gridRowLayout(
        contents: {
          a!richTextDisplayField(
            value:a!richTextItem(&amp;quot;FundHouse Name&amp;quot;,&amp;quot;STRONG&amp;quot;)),
          a!richTextDisplayField(value: &amp;quot;&amp;quot;),
          a!richTextDisplayField(value: &amp;quot;&amp;quot;)
        }
      ),
      a!forEach(
        rule!PM_FilterTreeGridAPI(local!revenues, &amp;quot;sFundHouseName&amp;quot;),
        {
          a!localVariables(
            local!show2: false,
            local!value: fv!item,
            {
              a!gridRowLayout(
                contents: {
                  a!richTextDisplayField(
                    value: a!richTextItem(
                      text: if(
                        local!show2,
                        concat(char(9), &amp;quot;- &amp;quot;, fv!item),
                        concat(char(9), &amp;quot;+ &amp;quot;, fv!item)
                      ),
                      style:if(local!show2,
                      &amp;quot;STRONG&amp;quot;,&amp;quot;PLAIN&amp;quot;),
                      link: a!dynamicLink(
                        saveInto: a!save(local!show2, not(local!show2))
                      )
                    )
                  ),
                  a!richTextDisplayField(value: &amp;quot;&amp;quot;),
                  a!richTextDisplayField(value: &amp;quot;&amp;quot;)
                }
              ),
              a!gridRowLayout(
                showWhen: local!show2,
                contents:{a!richTextDisplayField(value:a!richTextItem(concat(char(9),&amp;quot;Distributor Name&amp;quot;),&amp;quot;STRONG&amp;quot;)),
                a!richTextDisplayField(value:&amp;quot;&amp;quot;),
                a!richTextDisplayField(value:&amp;quot;&amp;quot;)}
              ),
              a!forEach(
                rule!PM_FilterTreeGridAPI(
                  rule!PM_FilterTreeGridfran(local!revenues, { local!value }),
                  &amp;quot;sDistributorName&amp;quot;
                ),
                {a!localVariables(
                
                ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My code looks like that (I stopped in local variables since there I repeat the process until I finish with the 6th key). To that I would need to add that &amp;quot;hierarchical select&amp;quot; I&amp;#39;m looking for. How would your structure be added to that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable rows in tree grid</title><link>https://community.appian.com/thread/96385?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2022 10:33:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:76c4aae0-5540-4f75-acea-05d44c80a405</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;It should be enough to add a saveInto() to add the IDs of the subrows to the selected items. Do you have any code snippets?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>