<?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>Default value in the group picker field should not be removed</title><link>https://community.appian.com/discussions/f/user-interface/37449/default-value-in-the-group-picker-field-should-not-be-removed</link><description>Hi Team, 
 I have a group Picker field and there is a condition that if mkv = &amp;#39;mk-3475&amp;#39; by default it should select a group called Keytruda writers. The users who is working on this interface cannot remove this group but they can add more groups along</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Default value in the group picker field should not be removed</title><link>https://community.appian.com/thread/140219?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 06:06:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:526c20df-998c-4e3a-972a-f787b5bc0b4e</guid><dc:creator>ankuraggarwal</dc:creator><description>&lt;p&gt;As an Extension to Kumar&amp;#39;s Solution, you can also add a validation in code like :&lt;/p&gt;
&lt;p&gt;This way we show an error message in case the particular group is removed.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!assignees,
  {
    a!pickerFieldGroups(
      label: &amp;quot;Group Picker&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      saveInto: {
        local!assignees,
      },
      validations: if(
        contains(local!assignees, togroup(465)),
        &amp;quot;&amp;quot;,
        &amp;quot;The  required group is missing. Please add group Writers Group Name&amp;quot;
      ),
      value: local!assignees
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default value in the group picker field should not be removed</title><link>https://community.appian.com/thread/140217?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 05:50:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c34a5f7b-8f2f-4830-b836-283681e26993</guid><dc:creator>Kumar Agniwesh</dc:creator><description>&lt;p&gt;Well I was able to achieve it to some level, the group keeps getting added even if they remove it. Also you can add the group by default after checking the condition while defining the variable.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default value in the group picker field should not be removed</title><link>https://community.appian.com/thread/140216?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 05:44:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0aec4db5-7dbd-4602-9e61-2471dafa1786</guid><dc:creator>p2005</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;the user shouldnot be able to remove the default group which has been added when the condition is met.&lt;/p&gt;
&lt;p&gt;for example, here the condition has met and the default group is added in the picker field. Now if I click on &amp;#39;x&amp;#39; mark I can remove that group. but what my requirement is the user&amp;nbsp;should not be able to remove this default group.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can we achieve this ?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1725342106827v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default value in the group picker field should not be removed</title><link>https://community.appian.com/thread/140215?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 05:37:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75043ba0-9f29-40b9-9eb6-812a68f82eb0</guid><dc:creator>Kumar Agniwesh</dc:creator><description>&lt;p&gt;So if I have understood you want to add that 1 group by default in ri!assignees if it matches the condition and also one of the groups selected by user.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;While user is searching and selecting the group they want, you can run a condition in saveinto part to check if it matches your condition and&amp;nbsp;&lt;br /&gt;then you add that group in your rule input.&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!assignees,
  {
    a!pickerFieldGroups(
      label: &amp;quot;Group Picker&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      saveInto: {
        local!assignees,
        if(
          true(),
          a!save(
            local!assignees,
            union(
              append(local!assignees, togroup(465)),
              append(local!assignees, togroup(465))
            )
          ),
          null()
        )
      },
      value: local!assignees,
      validations: {},
      
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>