Skip to content

TExpressionColumn crashes with spaces in column name #24

Description

@De-Novo-Research

The following code crashes

  var di:=TDataItem.Create;
  di.AsTable:=True;
  di.Items.Add('First column',dkInt32);
  di.Items.Add('Second column',dkInt32);

  di.Append([1,2]);

  di.Items.Add(TExpressionColumn.From(di,'First column / Second Column',True,'Ratio'));

It is finding a space after 'First' in the expression and trying to find a column called First.
I tried putting quotes around the column names in the expression

di.Items.Add(TExpressionColumn.From(di,'"First column" / "Second Column"',True,'Ratio'));

and then got

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions