Using picker control with multiples to send email

  • 18 August 2015
  • 3 replies
  • 7 views

Badge +1

Hi,

 

I am using a picker control bound to an AD smart object. The user can then select multiple users in the picker control.

Once the form is submitted , certain details needs to be emailed to the users in the picker control and or tasks assigned to them to approve etc.

 

What is the best way of accomplishing this?

 

I've tried using the destination list on the smart object method with using a list object as destination end points.

So taking the picker field passing it through a Split command using the delimeter as semicolon.

 

But I am unable to get this working.

 

Help would be greatly appreciated.


3 replies

Userlevel 3
Badge +9

use plan per solt (No destination) in workflow activity.

Badge +1

Hi

 

I've tried that but getting an error when the workflow executes

 

The field is called commentators and stores the data in the format "domainusername;domainusername2"

The error i am getting is - ActivityInstanceDestination property not available on given context.

 

In my workflow on the SmartObject Event I have set it to plan per slot (No Destinations), then select a list field to determine how many slots to use with the following

Split(Commentators,;)

 

Then on my mail event I have the input of Name as Activity Instance Data

 

What am I doing wrong?

 

Badge +10

Hi,

 

Using the Split funciton is correct.
If you are assigning tasks, assing the Result of the Split function as the destination users for that activity.
Set the Activity to Plan All at Once so that each destination user gets his/her own copy of the activity and it will then also resolve the destination user's email.
When task emails are sent, it will use the destination usser's email property from AD.

 

If you are sending a normal email event it is a bit trickier and you can then accomplish it using the Plan per slot no destination planning option.
Use the Split function in the allocation of the data for the slots to return all the usernames.
In your email's To field, make use of the Get Email for User method from the Users and Groups smartobject under the Task Allocation category to retrieve the user's email address. For the username input concatenate your label name (K2:) and the username now stored in the Activity Instance Data. The result should be something like this: K2:DomainUsername.
The return of that method will be the email address you can put in your To field.
During runtime each slot will get the user's email and will send it.

 

I hope the above makes sense and that it helps!

Regards,
JohanL

Reply