Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Lookup Fields in Custom and System Tables View modes: 
User avatar
Member
Member
Armysniper89 - 9/1/2011 1:51:57 PM
   
Lookup Fields in Custom and System Tables
I am creating some new fields that I want to add to the User system table and ask during registration. These fields would be stored as indexes in a lookup table in SQL. It is a single selection field type...so I am guessing I should store it as Integer? (just making sure) and for fields where multiple selections are made...I would store as a string? Again just making sure before I make the investment of time in this update.

Also, what is the delimiter for fields in a multi-select list box of look up values? Is it comma? If not can I set it to be a comma (I am importing users from our SiteFinity site).

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/4/2011 2:38:05 AM
   
RE:Lookup Fields in Custom and System Tables
Hi,

It is up to you what data type you will use for your custom fields according to your needs. I do not know the purpose of those fields nor what data you want store there.

If you will use our default multi-selection form control, the data are spearated by pipe sign "|". If you want to have another delimiter, you can create custom form control.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Armysniper89 - 9/5/2011 11:16:33 PM
   
RE:Lookup Fields in Custom and System Tables
Well in most cases I have a field that would store the index into a table that contains the "State" in the United States a "job posting" is located in. That table has an integer called "StateID" and that is the index to the state. I might have another that contains Multiple index values being stored. For example, if I wanted to store all the states a user selects in a multi-select list box.

In my current site, any fields that lookup and store a single integer index, would be defined as an integery. Any fields that would store multiple index values...would be stored as text with mutiple indexes being stored as a comma separated list.

I am guessing that the first scenario of storing an integer for an index value like "State" and I am guessing I would do the same with a text value and use the drop down list. I had read before that it would store as a piped list. Just confirming.

Would be great for portability of records for the import toolkit, if you could specify a delimeter other than the "pipe".

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/6/2011 3:07:53 AM
   
RE:Lookup Fields in Custom and System Tables
Hi,

We had to use some delimeter in our code since everybody could use something different and then it is hard to handle all options in the code. If you want to have something different, you can develop a custom form control based on the default controls and change the behavior according your needs.

Best regards,
Juraj Ondrus