User Selector form control filtering by Role or Department

Mark Elliott asked on January 14, 2015 17:34

In the form controls when setting up a data type there is the option to use a User Selector. This lists every user of the site which is great but is there a way to filter that list to only show users within a given role/department? Say for example to only show users that are in the Marketing or Communications department.

Correct Answer

Roman Hutnyk answered on January 14, 2015 21:01

Try UniSelector control with Object type = CMS.User and Return column = UserID. There is a field where you can enter where condition or some macro to filter users out.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Mark Elliott answered on January 14, 2015 22:17

Roman,

Thanks! That works great. We are new to Kentico and hadn't used the UniSelector control before. Very nice.

0 votesVote for this answer Mark as a Correct answer

Stephen Rushing answered on April 15, 2015 20:49

I have a question regarding the UniSelector: if our site requires staging and web farms, do we need to have UserGUID as the return column, or will the UserID automatically be resolved for each environment?

0 votesVote for this answer Mark as a Correct answer

Mark Elliott answered on April 15, 2015 20:54

I'm not sure. We don't use a staging server or a web farm environment so have not encountered this issue. Perhaps Roman would be able to address it.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.