Goal: John Joe(12/2) Breakdown: Name: John.Joe (User picker) Birthday: (date&time)If no name is selected then present "N/A"What I have tried:
=if(isnull(pv!processvariable.name), "N/A", user(pv!processvariable.name,"firstName")& " " & user(pv!processVriable.name,"lastName") & "(" pv!processVariable.birthday &" )" )Problem: Issue with If statement
Discussion posts and replies are publicly visible
if(isnull(pv!processvariable.name), "N/A", user(pv!processvariable.name,"firstName")& " " & user(pv!processvariable.name,"lastName") & "(" & pv!processvariable.birthday &" )" )
you seems to be missing an "&" (highlighted in green)
assuming you have a CDT type process variable named: processvariable
please correct the typo (corrected in amber)
Personally I find it more readable/codable to use the concat() function to avoid this kind of syntax error:
Separately, I notice you must be doing this in a Script Task in your process model. It's best practice to encapsulate code in an expression rule where it can be tested independently of the process itself. If you'd taken this route you would have found the error for yourself when constructing and testing the script.
© 2022 Appian. All rights reserved.