November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi Malin!
In StarCommunity 2.4 you are not able to add a UserAttribute from code, you have to add it manually in the database. This is described in "A Programmer's Guide to StarCommunity 2.4" in section "Dynamic User Attributes".
This section states that attributes are stored in
tblUserAttribute
To create a new attribute, add a new row to the table and chose the attribute type id:
0 = Checkbox
1 = DropDown
2 = ListBox
3 = RadioButton
4 = TextArea
5 = TextField
This will cause the admin interface to render the correct ASP.Net control. To make the attribute a multi-choice attribute, add the choices for the added attribute to the
tblUserAttributeChoice
table and make the connection.
Hope this helps!
//Tom
ps. I will make sure we add this version of A Programmer's Guide to the download section.
I'm trying to create a new UserAttribute, but it doesn't seem to "stick" in the database. I'm not supposed to manualy add it in the database am I?
I can create it with new SimpleUserAttribute(...), but when I read it later in the code I get an exception saying the Attribute does not exist.
What am I missing?