Email Template Logic

I’m attempting to have portions of the LCS Change template change depending on what the Life Cycle is.

I would expect the following code to work, but it doesn’t function properly.

#if($identity.cloudLifecycleState == “prehire” || $identity.cloudLifecycleState == “active”)
Start Date: $identity.startDate
#{else}
Term Date: $identity.endDate
#end

or

#if($identity.cloudLifecycleState == “prehire”)
Start Date: $identity.startDate
#elseif($identity.cloudLifecycleState == “active”)
Start Date: $identity.startDate
#{else}
Term Date: $identity.endDate
#end

Neither work. What am I missing?

Hi Nathan. What do you mean by “doesn’t function properly”? Is it always evaluating the else condition, even when you know the lifecycle state is “prehire” or “active”? If that is the case, then this sounds like a similar issue someone else is having.

After reading the backtrail of that linked item and another linked one, it appears that the response from Rich might be applicable to my issue as well:

yes, in response to your question.