<?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 do task assignments based on conditons ?</title><link>https://community.appian.com/discussions/f/process/14317/how-to-do-task-assignments-based-on-conditons</link><description>Lets say i have 2 groups, A &amp;amp; B. 
 If the initiator of a Process model is from group A, then a form with in Process model should be assigned to group B. Similarly for group B, it should be assigned to group A. 
 I have tried putting a if condition in</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to do task assignments based on conditons ?</title><link>https://community.appian.com/thread/64573?ContentTypeID=1</link><pubDate>Mon, 11 Feb 2019 14:03:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0a9d1706-8731-4a9e-8f75-8c3413309ee7</guid><dc:creator>Sunil Mohan</dc:creator><description>Thanks Rob for your replies, it really helps.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to do task assignments based on conditons ?</title><link>https://community.appian.com/thread/64532?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 16:13:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1a1625d3-42ef-4040-8026-54e59102d7ba</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;There are a variety of tricks you can consider.&lt;br /&gt;To troubleshoot, you can use a group type PV that you set prior to the user input task.&lt;br /&gt;Just use that as your assignment value once you get it working.&lt;/p&gt;
&lt;p&gt;&lt;a href="/members/tim.clarke"&gt;Tim&lt;/a&gt;&amp;nbsp;suggests an&amp;nbsp;approach that should work. &amp;nbsp;&lt;br /&gt;It&amp;#39;s worth a try.&amp;nbsp; But again, do it before the user input task and verify the value is setting properly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Group membership tests can get expensive&lt;/strong&gt;, though, and I would caution against designs that leverage them extensively.&lt;br /&gt;&lt;br /&gt;you might also have a use case for a &lt;strong&gt;decision object&lt;/strong&gt;.&amp;nbsp; The &lt;a href="https://docs.appian.com/suite/help/18.4/Appian_Decisions.html#common-uses-for-decisions" target="_blank"&gt;documentation actually uses a group assignment use case as an example for how decision objects work&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a trick you might also like to try.&lt;br /&gt;Full disclosure, maintaining the following may become tedious if the use case changes and you add many more groups.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add an assignTo parameter PV to the process model that includes the user input task with the assignment.
&lt;ul&gt;
&lt;li&gt;use this variable on the assignment tab&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Then, Create two very simple parent process models - one for each group.
&lt;ul&gt;
&lt;li&gt;Set the permissions on the action or related action that starts this process such that groups A&amp;amp;B can only see their respective action or relation action (i.e. each group only sees 1 action)&lt;/li&gt;
&lt;li&gt;In Group A&amp;#39;s process add a parameter PV called &amp;quot;assignTo&amp;quot; and default that value to group B&lt;/li&gt;
&lt;li&gt;In Group B&amp;#39;s process add a parameter PV called &amp;quot;assignTo&amp;quot; and default that value to group A&lt;/li&gt;
&lt;li&gt;Add a sub process task to each of these parent processes, and have them flow into the task assignment process, pass in the assignTo Variable.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This reduces the amount of expression evaluation that takes place in your process, and identifies &amp;quot;for free&amp;quot; which group started the process.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to do task assignments based on conditons ?</title><link>https://community.appian.com/thread/64524?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 10:59:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f4a08a3-6362-48c7-acf3-7c52f5286e5f</guid><dc:creator>Tim</dc:creator><description>It might help to share the error message? &lt;br /&gt;
The following should achieve what you need:&lt;br /&gt;
if(isusermemberofgroup(pp!initiator, cons!GROUP_A), cons!GROUP_B, cons!GROUP_A) &lt;br /&gt;
I would suggest running the expression within a script task set to run as the process designer and store the assignment value into a PV.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>