New features If you wish to suggest a new feature, please use the New features forum for version 3.x.
Version 2.x > New features > Custom Fields for user?? View modes: 
User avatar
Member
Member
tag2453 - 5/17/2007 11:15:30 PM
   
Custom Fields for user??
When I edit a user there is a tab for custom fields but you can't do anything. Just an OK button appears.

How do I add custom fields for a user and make them searchable? I'm trying to build a member directory.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 5/22/2007 1:53:44 PM
   
RE:Custom Fields for user??
If you want to add a custom field to the user, you must edit the database table CMS.User. You can do it at Site Manager/Development/System Tables/User. After this, you will find in the mentioned section the custom field(s) at the user administration.

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 3/27/2013 8:45:00 PM
   
RE:Custom Fields for user??
How can we get the custom field in the transformation?

e.g.: <%# Eval("CustomFieldName") %>

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/27/2013 11:16:17 PM
   
RE:Custom Fields for user??
Hello Gitesh,

As first... How and where is your custom field defined?

Best regards,
Martin Danko

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 4/1/2013 9:44:26 PM
   
RE:Custom Fields for user??
Hi Martin,

I have created a custom field in:
Development > System Tables > User Table

Now I am using the webpart called "Users Viewer" on my page with a transfomation called
community.transformations.rr-userslist (Code below). In this transformation I want to get the custom field value, that I created in "User Table"

<cms:usermenucontainer runat="server" ID="userMenuElem" MenuID="userContextMenu" Parameter='<%# Eval("UserID").ToString() %>' ContextMenuCssClass="UserContextMenu" >
<tr>
<td>
<a href="<%# HTMLEncode(GetMemberProfileUrl(Eval("UserName"))) %>" title="<%# Eval("UserName") %>">
Edit
</a>
</td>
<td>
<%# Eval("FirstName") %>
</td>
<td>
<%# Eval("UserName") %>
</td>
<td>
<%# GetDateTime("UserCreated","dd-MMM-yyyy") %>
</td>
</tr>
</cms:usermenucontainer>


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/1/2013 9:59:06 PM
   
RE:Custom Fields for user??
Hi,

At first, I would like to ask you to uise appropriate forum for given version - or, are you still using v2.x?

Anyway, what are the issues? Your steps are OK and it is working just fine in the newer version just the way you are doing it. Just make sure that in the web part are selected given columns to be pulled out of the DB, including your custom field/column.

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 4/1/2013 10:29:01 PM
   
RE:Custom Fields for user??
Hi Juraj,

Oops.... I am using kentico 7. Didin't realize this was kentico v2.0 forum.

What I am looking for is how to get custom field values in transformation.

e.g:
<%# Eval("CustomFieldName") %>
or
<%# GetCustomValue("CustomFieldName") %>

Thanks
Gitesh Shah

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/1/2013 10:56:36 PM
   
RE:Custom Fields for user??
Hi,

And what is the issue using the Eval("customfield")? As I said before - it is working just fine. How are you trying it?

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 4/2/2013 3:27:48 PM
   
RE:Custom Fields for user??
Hi Juraj,

I was trying to Eval("CustomFieldName") and it wasn't getting the value in the transformation.

I cleared cache and now it is working. Sorry my mistake.

Cheers
Gitesh Shah