Skip to main content

Hi All

 

Does anybody know if it's possible to conditionally show text email messages

 

I.e. I'd like some speciial information shown on the footer of the email but it should only appear it the user has a certain role.  I would use a smartobject to get the role and then based on that result the text would be shown or not displayed

 

I've had a look around all the functions but cant seem to find one that will do this

 

Any ideas?

 

thanks
Paul

Hi Paul,

Could you use an IF statement to populate a variable with the text or empty string and put that in the email body?

Regards,

Nathan
Hi Nathan

thanks for reply...

Is the 'IF' function available in K2 Five? We are actually using K2 Cloud and I don't see this in the function browser

regards
Paul

I am also in the need to dynamically populate an email message to different task groups based on a ID of the item the task is for.

 

Example:

If the request type is for itemId 1 -

Email to group 1:   nothing special for message

Email to group 2:  dynamic message

Email to group 3:  dynamic message

 

If the request type is for itemId 2 -

Email to group 1:  dynamic message

Email to group 2:  different dynamic message than email in itemId 1

Email to group 3:  different dynamic message than email in itemId 1

 

Our thought was if we have a SQL Table with the ItemID / GroupName / Email Message we could dynamically populate it that way of sorts but we can't seem to get it to populate the message.


Hi Paul,

 

I think you would have to use the decision diamond in K2 Five workflow.  One outcome could route to the next step where the other could populate the variable with the text you want in the email.  Would that work?

 

Regards,

 

Nathan


Hi AAschenbrener,

That should work - are you loading the message from the SQL table into a variable first?

Regards,

Nathan

Alternatively, you can use a SmartObject to retrieve the body of your e-mail and put all of that logic into a stored procedure or web service. That keeps the workflow simple, you won't need branching paths which sounds ideal if the only difference is a little bit of text in the task notification.


We are using K2 Cloud with no direct connections to SQL server - therefore not able to create any stored procedures.  Can only use out of the box K2 controls / functions


the issue should be solved with K2 Cloud Update 7  (January 2019)

A new 'IF' inline function has been added so this can be used to conditionally set values in email content

 


Reply