<?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>How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/discussions/f/general/25315/how-to-create-two-text-fields-in-single-column-in-grid-and-make-default-selection-of-all-rows-in-grid</link><description>Hi Champs, 
 I have an requirement that in editable grid i want two fields in a single column and also make all rows selectable by default .please, let me help for this issue. As in figure i want the result. 
 Thanks in advance..</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98423?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:43:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dd21fb32-b12d-4516-ad26-92a62550e1ad</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;Hey Stefan, correct, in the gridRowLayout we have to set id to fv!index.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98420?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:38:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:09aea916-5a0d-4c5c-959f-07e5ceff0a36</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The documentation for the gridRowLayout states:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a!gridRowLayout&lt;/strong&gt;&lt;span&gt;( &lt;/span&gt;&lt;em&gt;contents, id, selectionDisabled, showWhen&lt;/em&gt;&lt;span&gt; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and the id-value is what is stored in the selection. In the above code example fv!index is assigned.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I just wanted to make clear that the following:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;For by defauly all the selected row, you have to create a local variable to store to selection value and by default use enumerate(count(local!griddata))+1.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;is only true when the id field is set to fv!index. And this is NOT the default.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98416?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:26:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba7b531c-e526-468f-ae63-1a81bcb0c6b6</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;It is an editable grid. How can we have IDs if they are constructing the data in this grid?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98415?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:23:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e5f15c1c-02ad-4d1b-9913-0948b100dee0</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The grid selection is based on the IDs of the individual records. Not on the index&amp;nbsp;of the row in the grid.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98414?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:20:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:faf3aeef-35f7-4d97-8460-1e522c08e39d</guid><dc:creator>saijoshnavi2992</dc:creator><description>&lt;p&gt;Thank You&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98413?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:19:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1607e369-0816-491a-93d5-9863a13056a1</guid><dc:creator>saijoshnavi2992</dc:creator><description>&lt;p&gt;Thank You deepak for your response&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98404?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 05:55:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce6df6cf-c3e6-4920-8316-b78e37379222</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;For two fields in a column in grid is not possible. i hope you are using it for related value so for that you can create 2 columns and those 2 are related to each other. For by defauly all the selected row, you have to create a local variable to store to selection value and by default use enumerate(count(local!griddata))+1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98403?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 05:53:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c23970bd-8016-4017-9f36-5343a585724d</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Adding two components in a single cell is not possible. One cell can only have one component.&amp;nbsp;&lt;br /&gt;I am assuming that you want all the rows to be selected NOT SELECTABLE by default. So for this, you need to pass the list of indexes of the rows the variable that is storing the selectionValue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98402?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 04:17:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:387aae8a-dfc7-41e9-b9b2-53bfc3e0316f</guid><dc:creator>saijoshnavi2992</dc:creator><description>&lt;p&gt;Hi&amp;nbsp; Shubham Kumar,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp; want one dropdown field and paragraph field in single column in grid... As in image i kept earlier in a column reason&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create two text fields in single column in grid and make default selection of all rows in grid</title><link>https://community.appian.com/thread/98401?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 04:13:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ed45af45-44ce-488b-9c1e-5fb2e3ac6a57</guid><dc:creator>Shubham Kumar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please see the below code as an example for your requirements. I hope it will help... let me know if any concerns.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!condition: cons!ZMS_PEN_CONDITIONS,
  local!types: cons!ZMS_PEN_TYPES,
  a!formLayout(
    label: &amp;quot;Add Multiple Pens Data&amp;quot;,
    contents: {
      a!gridLayout(
        totalCount: count(ri!items),
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;Pen Name&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Type&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Condition&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Image&amp;quot;),
          a!gridLayoutHeaderCell(label: &amp;quot;Description&amp;quot;),
          /* For the &amp;quot;Remove&amp;quot; column */
          a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;)
        },
        /* Only needed when some columns need to be narrow */
        columnConfigs: {
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 1),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 1),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
          a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
        },
        rows: a!forEach(
          items: ri!items,
          expression: a!gridRowLayout(
            id: fv!index,
            contents: {
              a!textField(
                label: &amp;quot;pen name &amp;quot; &amp;amp; fv!index,
                value: fv!item.penname,
                saveInto: fv!item.penname,
                required: true
              ),
              a!dropdownField(
                label: &amp;quot;condition &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: local!types,
                choiceValues: local!types,
                value: fv!item.pentype,
                saveInto: fv!item.pentype,
                required: true
              ),
              a!dropdownField(
                label: &amp;quot;condition &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: local!condition,
                choiceValues: local!condition,
                value: fv!item.pencondition,
                saveInto: fv!item.pencondition,
                required: true
              ),
              a!fileUploadField(
                target: cons!ZMS_PEN_IMAGE_FOLDER,
                maxSelections: 1,
                value: fv!item.penimage,
                saveInto: fv!item.penimage,
                required: true,
                requiredMessage: &amp;quot;pen image is required&amp;quot;,
                validations: {
                  a!localVariables(
                    local!invalidExtensions: difference(
                      upper(fv!files.extension),
                      { &amp;quot;PNG&amp;quot;, &amp;quot;JPG&amp;quot; }
                    ),
                    if(
                      length(local!invalidExtensions) &amp;gt; 0,
                      &amp;quot;Attachments must be images. Remove: &amp;quot; &amp;amp; index(
                        fv!files,
                        &amp;quot;name&amp;quot;,
                        wherecontains(
                          local!invalidExtensions,
                          upper(fv!files.extension)
                        ),
                        {}
                      ),
                      &amp;quot;&amp;quot;
                    )
                  ),
                  if(
                    or(fv!files.size &amp;gt; 300000),
                    &amp;quot;Attachments may not exceed 300KB. Remove: &amp;quot; &amp;amp; index(
                      fv!files,
                      &amp;quot;name&amp;quot;,
                      where(fv!files.size &amp;gt; 300000),
                      {}
                    ),
                    &amp;quot;&amp;quot;
                  )
                },
                buttonStyle: &amp;quot;SECONDARY&amp;quot;,
                buttonSize: &amp;quot;STANDARD&amp;quot;
              ),
              a!textField(
                value: fv!item.characteristics,
                saveInto: fv!item.characteristics,
                characterLimit: 100,
                required: true,
                validationGroup: &amp;quot;main&amp;quot;
              ),
              /* For the Removal Column*/
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;close&amp;quot;,
                  altText: &amp;quot;delete &amp;quot; &amp;amp; fv!index,
                  caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.penname,
                  link: a!dynamicLink(
                    value: fv!index,
                    saveInto: {
                      a!save(ri!items, remove(ri!items, save!value))
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            }
          )
        ),
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Pen&amp;quot;,
          value: &amp;#39;type!{urn:com:appian:types:ZMS}ZMS_Pens&amp;#39;(
            createdby: loggedInUser(),
            createddate: now(),
            status: &amp;quot;Active&amp;quot;
          ),
          saveInto: {
            a!save(ri!items, append(ri!items, save!value))
          }
        ),
        rowHeader: 1
      )
    },
    buttons: a!buttonLayout(
      primaryButtons: a!buttonWidget(
        label: &amp;quot;Submit&amp;quot;,
        saveInto: a!writeToDataStoreEntity(
          dataStoreEntity: cons!ZMS_DSE_PENS,
          valueToStore: ri!items/*onSuccess: ri!items*/
          
        ),
        submit: true
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please modify the code as per your fields.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1658808786876v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>