Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Transformation Department Roles Selector View modes: 
User avatar
Member
Member
Rene 7 - 3/26/2012 10:51:05 PM
   
Transformation Department Roles Selector
Hi Kentico,
I created a document type with Form Control Type "Selector" and Form Control "Department Roles Selector". So I can select a number of roles associated with this document type.
Now I want to output these roles in a transformation but no luck. I guess it is a collection of values, but how would I access them?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/27/2012 3:13:23 AM
   
RE:Transformation Department Roles Selector
Hi,

why you need to display this control in transformation? Could you please describe the real word use case?

To display the role names you will need to create a custom transformation function for this. The value of control is not stored directly in your document type. Your column will contain 0.

The actual value is stored in the CMS_ACL table (there is ACLID), a reference on node which contains this value is column ACLOwnerNodeID. This is a key to CMS_Tree table.

On the form tab are data selected using query:

SELECT RoleID FROM View_CMS_ACLItem_ItemsAndOperators WHERE (RoleID IS NOT NULL) AND (((Allowed & 1) >= 1) AND (ACLID = 45))


In your transformation code you can use our API:
//Int32 is NodeID it is available in the transformation so you can pass this parameter to your custom method
AclProvieder.GetACLItems(Int32)


This way you will have ACLIDs, you may use above query or API to find RoleIDs. Then you can use RoleInfoProvider class to get information about role.

API documentation may be useful for you.

Best regards,
Ivana Tomanickova


User avatar
Member
Member
Rene 7 - 3/28/2012 6:54:48 PM
   
RE:Transformation Department Roles Selector
Thank you!