<?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>Editable Grid</title><link>https://community.appian.com/discussions/f/user-interface/17989/editable-grid</link><description>Hi, 
 
 I have a requirement in where user can add new element in drop down field. 
 For ex: if drop down field contains element : {&amp;quot;apple&amp;quot; , &amp;quot;orange&amp;quot; , &amp;quot;pineapple&amp;quot; , other }. 
 Then on clicking other he/she should be able to add new element in dropdown</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Editable Grid</title><link>https://community.appian.com/thread/70813?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 12:32:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec8a1e07-21f4-4331-9542-c5f062db14ab</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I believe you will need to use multiple elements and a more complex form to achieve this functionality.&amp;nbsp; Nothing within appian currently handles the particular complexity you&amp;#39;re referring to, all in one element.&amp;nbsp; Particularly, you&amp;#39;ll need functionality to allow the user to discern whether they want to use an item currently in the dropdown (from DB), or add a new entry, then to capture what that entry is, validate it (make sure it&amp;#39;s not too long, fits any other business requirements, etc), then write it to the database (i assume).&amp;nbsp; This can be done any number of ways but I strongly advise against trying to cram it all into one field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid</title><link>https://community.appian.com/thread/70811?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 10:40:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d40a4725-8341-48d5-a058-8c60925b756a</guid><dc:creator>subodhl</dc:creator><description>&lt;p&gt;Thanks Harsha,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have requirement where i can fetch data from database and display in drop down.So the user able to select data form drop-down and if require can add his/her data into drop down.This data will be dynamic so user can add any number of elements as per his requirements.&lt;/p&gt;
&lt;p&gt;Thanks and Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid</title><link>https://community.appian.com/thread/70785?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 11:45:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ca958260-17c8-426f-8864-3e2fede4134f</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Yeah you can achieve this just need to&amp;nbsp;modify the code somewhat. Something like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!choiceData: {
    &amp;quot;apple&amp;quot;,
    &amp;quot;orange&amp;quot;,
    &amp;quot;pineapple&amp;quot;,
    &amp;quot;other&amp;quot;
  },
  local!selectedData,
  local!newOption,
  a!formlayout(
    contents: {
      a!gridLayout(
        label: &amp;quot;Grid&amp;quot;,
        headerCells: {
          a!gridLayoutHeaderCell(
            label: &amp;quot;Field 1&amp;quot;
          )
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(
            width: &amp;quot;DISTRIBUTE&amp;quot;
          )
        },
        rows: a!gridRowLayout(
          contents: {
            a!dropdownField(
              label: &amp;quot;Example&amp;quot;,
              choiceLabels: local!choiceData,
              placeholderLabel: &amp;quot;Select&amp;quot;,
              choiceValues: local!choiceData,
              value: local!selectedData,
              saveInto: {
                local!selectedData,
                a!save(
                  local!newOption,
                  null
                )
              },
              showWhen: local!selectedData &amp;lt;&amp;gt; &amp;quot;other&amp;quot;
            ),
            a!textField(
              label: &amp;quot;Enter new value&amp;quot;,
              value: local!newOption,
              saveInto: {
                local!newOption,
                a!save(
                  local!choiceData,
                  if(
                    rule!APN_isBlank(
                      save!value
                    ),
                    local!choiceData,
                    append(
                      local!choiceData,
                      save!value
                    )
                  )
                ),
                a!save(
                  local!selectedData,
                  save!value
                )
              },
              showWhen: local!selectedData = &amp;quot;other&amp;quot;
            )
          }
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will change the dropdown into a textfield in place as soon as user enters the new element automatically changes textfield back to dropdown. You can modify as required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid</title><link>https://community.appian.com/thread/70782?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 10:13:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:842dc739-b5b1-4a56-9dd7-9b7d5736a4d6</guid><dc:creator>subodhl</dc:creator><description>&lt;p&gt;Thanks Harsha,&lt;/p&gt;
&lt;p&gt;But can we achieve the above functionality in dropdown field only.&lt;/p&gt;
&lt;p&gt;For ex: The dropdown may convert into textfield for addition of new element or somehow we are able to add element in dropdown only.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid</title><link>https://community.appian.com/thread/70781?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 09:57:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0b935c46-862e-4772-b598-1b414e41e89f</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;You can achieve this by enabling a textField() whenever user selects &amp;quot;Other&amp;quot; option. The user can enter new option in the said text field and inside the saveInto of this textField, you can update the elements array that is provided in dropdown.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!choiceData: {
    &amp;quot;apple&amp;quot;,
    &amp;quot;orange&amp;quot;,
    &amp;quot;pineapple&amp;quot;,
    &amp;quot;other&amp;quot;
  },
  local!selectedData,
  local!newOption,
  a!formlayout(
    contents: {
      a!dropdownField(
        label: &amp;quot;Example&amp;quot;,
        choiceLabels: local!choiceData,
        placeholderLabel: &amp;quot;Select&amp;quot;,
        choiceValues: local!choiceData,
        value: local!selectedData,
        saveInto: local!selectedData
      ),
      a!textField(
        label: &amp;quot;Enter new value&amp;quot;,
        value: local!newOption,
        saveInto: {
          local!newOption,
          a!save(
            local!choiceData,
            if(
              rule!APN_isBlank(
                save!value
              ),
              local!choiceData,
              append(
                local!choiceData,
                save!value
              )
            )
          )
        },
        showWhen: local!selectedData = &amp;quot;other&amp;quot;
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can refer this if it helps, for a grid you will need to make some tweeks though!&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>