Skip to content

b72f6f8a 2e9c df85 2f5e 47193f23d6ab

Fernando Garcia edited this page May 8, 2018 · 1 revision

GroupModel.Fields Property

Additional header content

Gets or sets collection of fields contained within the group.

Namespace: iTin.Export.Model
Assembly: iTin.Export.Core (in iTin.Export.Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public List<GroupItemModel> Fields { get; set; }

VB

Public Property Fields As List(Of GroupItemModel)
	Get
	Set

Property Value

Type: List(GroupItemModel)
Collection of fields contained within the group. Each element is composed of a field name and a field separator.

Remarks

ITEE Object Element Usage

<Group>
  <Field .../>
  <Field .../>
  ...
<Group>

Examples

The following example creates a new group called AddressGroup as a result of the union of three fields. XML

<Groups>     
  <Group Name="AddressGroup">
    <Field Name="CMADR1" Separator="Comma"/>
    <Field Name="CMCITY" Separator="Comma"/>
    <Field Name="CMPSTAL"/>
  </Group>
</Groups>

C#

public void CreateGroup()
{
    GroupsModel groups = new GroupsModel();

    GroupModel addressGroup = new GroupModel
                                    { 
                                        Name = "AddressGroup",
                                        Fields = new List<GroupItemModel>
                                                        {
                                                            new GroupItemModel { Name = "CMADR1", Separator = "Comma" },
                                                            new GroupItemModel { Name = "CMCITY", Separator = "Comma" },
                                                            new GroupItemModel { Name = "CMPSTAL" }
                                                        }
                                    };
    addressGroup.SetOwner(groups);
    groups.Items.Add(addressGroup);

    ExportModel export = new ExportModel 
                             {
                                 Table = 
                                     {
                                         Name = "Sample",
                                         Alias = "New table",
                                         Location = new[] { 2, 2}, 
                                         Groups = groups
                                     } 
                             };

    ExportsModel model = new ExportsModel();
    model.Items.Add(export);
}

See Also

Reference

GroupModel Class
iTin.Export.Model Namespace

Clone this wiki locally