Skip to main content

Hi,

 

Is it possible to have a People Picker tool in K2 Smartforms, but limit the selection to one AD Group?

 

I want to allow a user to click on a Drop Down List Control and display all the members of an AD Group, but then allow them to pick one or more users by dragging them into a text box and then email the chosen people. Is this possible?

 

Thanks as always

Hi Sharpharp

 

Yes you can do this. You need to use the GetUsersByGroup  method for the ADUser object in the ADService2 Service Instance (you may need to create a smartobject for this if you already havent)

 

Set the data source for the Picker  to this smartobject and method, and then configure the "When the Picker is resolving" rule and enter the name of the group in the input parameter. 

 

I have attached some screen shots to help.





Hi @Sharpharp1,

 

you can refere to  @andrewb's solution for the picker control

 

about the dropdown list I have prepared a solution for you, as I believe that you need to:

 

View

 

 

Here we have the Name DROPDOWN list is using AD user and configured like this:

 

 

 

 

 

 

 

 

Now we need to edit some rules:

 

When view Initialize, edit the populating rule:

 

 

we set the input mapping as shown below:

 

 

now we need to set some rules:

 

1- When DropDown List is changed

 

 

If condition to check if the "To" Field is not empty

 

 

If "To" Field is Emty we transfare only the dropdown list value to the "To" Field

 

 

Else, we transfare the "To" Field and the DropDown List Value to the "To" Field:

 

Note: There is Comma between the two Items to separate E-mails with Comma.

 

 

 

 

Send E-mail 

 

 

 

 

 

Test:

 

 

Result:

 

 

UPDATED POST

 

Note: You can download HTMLEditor Control to use it for the Email body 

 

Wish it's useful :) 

 


Sorry to dig up an oldish thread, but i needed this for a form i am working on...

 

I've used the drop down tool to connect to an ALL staff group, but when the form is loading, it bombs out:

 

"An unexpected error occurred while attempting to execute a server-side operation.
r0] Error: Not enough storage is available to complete this operation. (error)"

 

Is this because there are too many staff for the control to populate?

 

I then tried the People Picker control and hooked it up to my all staff group, but when i run the form and use the people picker to search for a surname for example, it returns names for users which are not in the GROUP i specified, how is that possible?

 

If i enter a surname on the picker line (instead of search) it says unresolved elements.

 

Is there a way to just enter anything on the line and it automatically brings back results for all the findings for that search term?
 

Thanks


hi mustafa 

 

How do i create the AD user smart obuject


Code-seeker,

 

You shouldn't have to create it, it's already there out of the box.

Look in Designer - Active Directory/ Active Service Service2 and you can use the existing Smartobjects such as AD User, AD Group.

 

When doing the rules, select the Smartobject, (AD USER) then choose a method like GetUsersByGroup or GetUserdetails. For the inputs, put in a AD Group name or a USerID. The method then pulls in the AD info (fields like department, job title etc, and in the Outputs of the Method, map them to data labels / Labels / text boxes etc

 

 


Reply