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
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