<?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>To check if a group exists in environment.</title><link>https://community.appian.com/discussions/f/general/28110/to-check-if-a-group-exists-in-environment</link><description>I have a use case to check if a group already exists. And if not, we should create the group. 
 Is there any way to check a group exists in an environment already.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: To check if a group exists in environment.</title><link>https://community.appian.com/thread/109593?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 20:46:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:38f3feb0-5a02-47fb-8564-2ca556a3c33a</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As Mike mentioned you can use a!groupsByName() to check if group with that name exist or not, like&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  a!isNullOrEmpty(a!groupsByName(&amp;quot;IN Users&amp;quot;)),
  &amp;quot;Create group&amp;quot;,
  &amp;quot;Never mind, don&amp;#39;t create&amp;quot;
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: To check if a group exists in environment.</title><link>https://community.appian.com/thread/109589?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 20:10:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:afa5bbc3-fe7b-41bf-9873-342b7f2289f9</guid><dc:creator>shwethasami</dc:creator><description>&lt;p&gt;I have a scenario to&amp;nbsp;check a group exists by it&amp;#39;s name without group ID..&lt;/p&gt;
&lt;p&gt;I&amp;#39;m having a text value and want to check if a group name similar to a text exists or not.&lt;/p&gt;
&lt;p&gt;i.e., Suppose, I have a country Code of IN for the country INDIA, Now, I want to check if any group in name of eg:&amp;quot;IN Users&amp;quot;(text value which is to be created as a group) is present in the environment.. If it is not present, I will go ahead and create a group named &amp;quot;IN Users&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: To check if a group exists in environment.</title><link>https://community.appian.com/thread/109586?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 19:57:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:89728f77-000d-40e7-88a1-fcb0b115de82</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;By what metric would you judge whether a group &amp;quot;already exists&amp;quot;?&amp;nbsp; If you&amp;#39;re just going by Group Name, you can always check the &amp;quot;get group by name&amp;quot; function and see if there are any results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>