Quintiq file version 2.0
#parent: #root
Method AddColumn (
  internal[ColumnTitles] columns,
  structured[shadow[LibOpt_UISnapshotAttribute]] attributes,
  internal[DataSetColumn] target
) id:Method_LibOpt_FormIteration_AddColumn
{
  #keys: '[139164.5.1067713872]'
  Body:
  [*
    level := columns.DataSetLevel();
    
    traverse( attributes, Elements, att )
    {
      column := DataSetConfigurableColumn::Create( level.Columns() );
      column.Text( Form.CreateConfigurableColumnString( att ) );
      column.Name( att.Path() + '.' + att.AttributeName() );
    
      if( isnull( target ) )
      {
        level.Columns().StoreColumn( &column );
      }
      else
      {
        level.Columns().StoreColumnBefore( &column, target );
      }
    }
  *]
}
