Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Multi-Select Document Fields View modes: 
User avatar
Member
Member
Armysniper89 - 5/18/2011 10:00:47 AM
   
Multi-Select Document Fields
I have Events that are coming in from an external source. My thought was that I would import them into my Kentico site's SQL Server once a day so they can be displayed in Kentico along with events that are created in Kentico. There are a bunch of additional fields they want to capture from the basic Event document type and some of them are lookup values to other SQL tables. The problem is that they need to support multi-select values for some fields. For example, category might have multiple values.

Is there away to setup a multi-select value for a field in a document type? I can see there is a way to show drop down lists and radio buttons but I need the ability to select mutliple values. If I cannot do it in a document type, can I do it in a system table?


User avatar
Member
Member
snk1324 - 5/18/2011 3:58:37 PM
   
RE:Multi-Select Document Fields
Yes, choose ListBox as the field type.

User avatar
Member
Member
Armysniper89 - 5/19/2011 2:33:45 PM
   
RE:Multi-Select Document Fields
How are the values stored? Is there a way to have the values stored in a separate support table?

User avatar
Member
Member
kentico_michal - 5/20/2011 1:29:34 AM
   
RE:Multi-Select Document Fields
Hello,

The selected values are separated with a pipe and stored in the following format:

Value1|Value2|Value3...

If you want to store this string in separate table you will need to create a custom form control and implement this functionality. For more information about custom form controls please visit this section of Developer’s guide: Developing form control.


Best regards,
Michal Legen

User avatar
Member
Member
Armysniper89 - 8/2/2011 4:26:16 PM
   
RE:Multi-Select Document Fields
Is there a way to change the delimeter used to commas instead of pipes?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/3/2011 1:38:46 AM
   
RE:Multi-Select Document Fields
Hi,

The only way, without source code license, is to develop a custom form control which will store the values in format you like.

Best regards,
Juraj Ondrus

User avatar
Member
Member
rahat.veraida-gmail - 12/11/2011 4:50:11 PM
   
RE:Multi-Select Document Fields
That defines the storing part. But how do we display the stored values using a cmsdatalist?

User avatar
Member
Member
kentico_michal - 12/12/2011 2:02:11 AM
   
RE:Multi-Select Document Fields
Hello,

1) You can create a custom transformation function which will parse the value in the given field and display whatever you want based on parsed values: Adding custom functions to transformations

2) You can create a custom form control which will store the values in your desired format: Developing form controls

Best regards,
Michal Legen