<?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>If statement and logic</title><link>https://community.appian.com/discussions/f/rules/24617/if-statement-and-logic</link><description>Goal: John Joe(12/2) Breakdown: Name: John.Joe (User picker) Birthday: (date&amp;amp;time) If no name is selected then present &amp;quot;N/A&amp;quot; What I have tried: 
 =if(isnull(pv!processvariable.name), &amp;quot;N/A&amp;quot;, user(pv!processvariable.name,&amp;quot;firstName&amp;quot;)&amp;amp; &amp;quot; &amp;quot; &amp;amp; user(pv!processVriable</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: If statement and logic</title><link>https://community.appian.com/thread/95167?ContentTypeID=1</link><pubDate>Tue, 17 May 2022 07:54:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:969dc3eb-d95f-4bbf-a97b-9f21cd77f508</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Personally I find it more readable/codable to use the concat() function to avoid this kind of syntax error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;= if(
  isnull(pv!processvariable.name),
  &amp;quot;N/A&amp;quot;,
  fn!concat(
    user(pv!processvariable.name, &amp;quot;firstName&amp;quot;),
    &amp;quot; &amp;quot;,
    user(pv!processVriable.name, &amp;quot;lastName&amp;quot;),
    &amp;quot;(&amp;quot;,
    pv!processVariable.birthday,
    &amp;quot; )&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Separately, I notice you must be doing this in a Script Task in your process model. It&amp;#39;s best practice to encapsulate code in an expression rule where it can be tested independently of the process itself. If you&amp;#39;d taken this route you would have found the error for yourself when constructing and testing the script.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If statement and logic</title><link>https://community.appian.com/thread/95164?ContentTypeID=1</link><pubDate>Tue, 17 May 2022 07:44:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6d87e58e-a80b-4b2a-9ef4-f8089be3fda6</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;&lt;span&gt;if(isnull(pv!processvariable.name), &amp;quot;N/A&amp;quot;, user(pv!processvariable.name,&amp;quot;firstName&amp;quot;)&amp;amp; &amp;quot; &amp;quot; &amp;amp; user(pv!&lt;span style="color:#ff9900;"&gt;processvariable&lt;/span&gt;.name,&amp;quot;lastName&amp;quot;) &amp;amp; &amp;quot;(&amp;quot; &lt;span style="color:#008000;"&gt;&amp;amp;&lt;/span&gt; pv!&lt;span style="color:#ff9900;"&gt;processvariable&lt;/span&gt;.birthday &amp;amp;&amp;quot; )&amp;quot; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;you seems to be missing an &amp;quot;&amp;amp;&amp;quot; (highlighted in &lt;span style="color:#008000;"&gt;green&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;assuming you have a CDT type process variable named:&amp;nbsp;processvariable&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;please correct the typo (corrected in &lt;span style="color:#ff9900;"&gt;amber)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>