<?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>Why wont this save?</title><link>https://community.appian.com/discussions/f/rules/21519/why-wont-this-save</link><description>Hi, 
 So Im trying to get this code to save below into my ri! field but no matter what I do it will not save. Can someone please tell me whats wrong here?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Why wont this save?</title><link>https://community.appian.com/thread/84107?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 12:18:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:900e5f15-ce29-4345-bffd-5b9ff2d5c076</guid><dc:creator>gayathris876948</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Below sample may be helpful for this case,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1627474708981v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;a!localVariables(
  local!firstItem_txt,
  local!secondItem_txt,
  local!thirItem_txt,
  local!combinedItem_txt,/*ri!orders.products*/
  {
    a!sectionLayout(
      label: &amp;quot;Section&amp;quot;,
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!dropdownField(
                  label: &amp;quot;Dropdown 1&amp;quot;,
                  labelPosition: &amp;quot;ABOVE&amp;quot;,
                  placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                  choiceLabels: {
                    &amp;quot;Option 1&amp;quot;,
                    &amp;quot;Option 2&amp;quot;,
                    &amp;quot;Option 3&amp;quot;,
                    &amp;quot;Option 4&amp;quot;,
                    &amp;quot;Option 5&amp;quot;,
                    &amp;quot;Option 6&amp;quot;,
                    &amp;quot;Option 7&amp;quot;,
                    &amp;quot;Option 8&amp;quot;,
                    &amp;quot;Option 9&amp;quot;,
                    &amp;quot;Option 10&amp;quot;,
                    &amp;quot;Option 11&amp;quot;,
                    &amp;quot;Option 12&amp;quot;
                  },
                  choiceValues: {
                    &amp;quot;Option 1&amp;quot;,
                    &amp;quot;Option 2&amp;quot;,
                    &amp;quot;Option 3&amp;quot;,
                    &amp;quot;Option 4&amp;quot;,
                    &amp;quot;Option 5&amp;quot;,
                    &amp;quot;Option 6&amp;quot;,
                    &amp;quot;Option 7&amp;quot;,
                    &amp;quot;Option 8&amp;quot;,
                    &amp;quot;Option 9&amp;quot;,
                    &amp;quot;Option 10&amp;quot;,
                    &amp;quot;Option 11&amp;quot;,
                    &amp;quot;Option 12&amp;quot;
                  },
                  value: local!firstItem_txt,
                  saveInto: {
                    local!firstItem_txt,
                    if(
                      or(
                        isnull(local!firstItem_txt),
                        isnull(local!secondItem_txt),
                        isnull(local!thirItem_txt)
                      ),
                      {},
                      a!save(
                        local!combinedItem_txt,
                        joinarray(
                          {
                            local!firstItem_txt,
                            local!secondItem_txt,
                            local!thirItem_txt
                          },
                          &amp;quot;,&amp;quot;
                        )
                      )
                    )
                  }
                )
              }
            ),
            a!columnLayout(
              contents: {
                a!dropdownField(
                  label: &amp;quot;Dropdown 2&amp;quot;,
                  labelPosition: &amp;quot;ABOVE&amp;quot;,
                  placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                  choiceLabels: {
                    &amp;quot;Option 1&amp;quot;,
                    &amp;quot;Option 2&amp;quot;,
                    &amp;quot;Option 3&amp;quot;,
                    &amp;quot;Option 4&amp;quot;,
                    &amp;quot;Option 5&amp;quot;,
                    &amp;quot;Option 6&amp;quot;,
                    &amp;quot;Option 7&amp;quot;,
                    &amp;quot;Option 8&amp;quot;,
                    &amp;quot;Option 9&amp;quot;,
                    &amp;quot;Option 10&amp;quot;,
                    &amp;quot;Option 11&amp;quot;,
                    &amp;quot;Option 12&amp;quot;
                  },
                  choiceValues: {
                    &amp;quot;Option 1&amp;quot;,
                    &amp;quot;Option 2&amp;quot;,
                    &amp;quot;Option 3&amp;quot;,
                    &amp;quot;Option 4&amp;quot;,
                    &amp;quot;Option 5&amp;quot;,
                    &amp;quot;Option 6&amp;quot;,
                    &amp;quot;Option 7&amp;quot;,
                    &amp;quot;Option 8&amp;quot;,
                    &amp;quot;Option 9&amp;quot;,
                    &amp;quot;Option 10&amp;quot;,
                    &amp;quot;Option 11&amp;quot;,
                    &amp;quot;Option 12&amp;quot;
                  },
                  value: local!secondItem_txt,
                  saveInto: {
                    local!secondItem_txt,
                    if(
                      or(
                        isnull(local!firstItem_txt),
                        isnull(local!secondItem_txt),
                        isnull(local!thirItem_txt)
                      ),
                      {},
                      a!save(
                        local!combinedItem_txt,
                        joinarray(
                          {
                            local!firstItem_txt,
                            local!secondItem_txt,
                            local!thirItem_txt
                          },
                          &amp;quot;,&amp;quot;
                        )
                      )
                    )
                  }
                )
              }
            ),
            a!columnLayout(
              contents: {
                a!dropdownField(
                  label: &amp;quot;Dropdown 3&amp;quot;,
                  labelPosition: &amp;quot;ABOVE&amp;quot;,
                  placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                  choiceLabels: {
                    &amp;quot;Option 1&amp;quot;,
                    &amp;quot;Option 2&amp;quot;,
                    &amp;quot;Option 3&amp;quot;,
                    &amp;quot;Option 4&amp;quot;,
                    &amp;quot;Option 5&amp;quot;,
                    &amp;quot;Option 6&amp;quot;,
                    &amp;quot;Option 7&amp;quot;,
                    &amp;quot;Option 8&amp;quot;,
                    &amp;quot;Option 9&amp;quot;,
                    &amp;quot;Option 10&amp;quot;,
                    &amp;quot;Option 11&amp;quot;,
                    &amp;quot;Option 12&amp;quot;
                  },
                  choiceValues: {
                    &amp;quot;Option 1&amp;quot;,
                    &amp;quot;Option 2&amp;quot;,
                    &amp;quot;Option 3&amp;quot;,
                    &amp;quot;Option 4&amp;quot;,
                    &amp;quot;Option 5&amp;quot;,
                    &amp;quot;Option 6&amp;quot;,
                    &amp;quot;Option 7&amp;quot;,
                    &amp;quot;Option 8&amp;quot;,
                    &amp;quot;Option 9&amp;quot;,
                    &amp;quot;Option 10&amp;quot;,
                    &amp;quot;Option 11&amp;quot;,
                    &amp;quot;Option 12&amp;quot;
                  },
                  value: local!thirItem_txt,
                  saveInto: {
                    local!thirItem_txt,
                    if(
                      or(
                        isnull(local!firstItem_txt),
                        isnull(local!secondItem_txt),
                        isnull(local!thirItem_txt)
                      ),
                      {},
                      a!save(
                        local!combinedItem_txt,
                        joinarray(
                          {
                            local!firstItem_txt,
                            local!secondItem_txt,
                            local!thirItem_txt
                          },
                          &amp;quot;,&amp;quot;
                        )
                      )
                    )
                  }
                )
              }
            )
          }
        )
      }
    ),
    a!textField(
      showWhen: not(isnull(local!combinedItem_txt)),
      label: &amp;quot;Result&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      readOnly: true,
      value: local!combinedItem_txt
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why wont this save?</title><link>https://community.appian.com/thread/84106?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 12:18:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eb3d7023-f779-486a-afb6-39038f32b268</guid><dc:creator>ashleym0002</dc:creator><description>&lt;p&gt;Why do it there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why wont this save?</title><link>https://community.appian.com/thread/84105?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 12:04:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d8ab289e-4b71-4297-87bd-d5bdb5025663</guid><dc:creator>ashleym0002</dc:creator><description>&lt;p&gt;Thanks for the quick reply! Ok so the user is selecting items from 3 drop down fields and whatever they select I want it to populate a readonly field. They cant make changes to this field. They can only change it from those 3 drop down fields... Once I get the 3 choices I need to save it into my ri!order,products, but how?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why wont this save?</title><link>https://community.appian.com/thread/84104?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 12:02:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c2693172-956d-41ae-91d5-4a27eadf068a</guid><dc:creator>gayathris876948</dc:creator><description>&lt;p&gt;If you want just populate this for DB writes, you can call it in the submit button saveInto like&lt;br /&gt;&lt;br /&gt;saveInto:{&lt;/p&gt;
&lt;p&gt;a!save(&lt;/p&gt;
&lt;p&gt;ri!orders.products,&amp;nbsp;concat(&lt;/p&gt;
&lt;p&gt;ri!firstItem&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why wont this save?</title><link>https://community.appian.com/thread/84103?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 12:00:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bbebd274-8333-4735-88db-35a836daf2cc</guid><dc:creator>gayathris876948</dc:creator><description>&lt;p&gt;Hi&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The expression in the&amp;nbsp;&lt;/span&gt;&lt;span class="searchhighlight"&gt;saveInto&lt;/span&gt;&lt;span&gt;&amp;nbsp;parameter only evaluates when the user interacts with the component. Since you have made it as readOnly there is no user interaction hence so value is not populating.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you explain your usecase?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>