Skip to Main Content
Status Completed
Workspace DX Assets
Created by Micheal Charron
Created on Apr 25, 2024

Create Expression Column - (Utility - Collection Manipulation)

Just looking at a question in the community that would benefit from a "Create Expression Column" action in the "Utility - Collection Manipulation VBO". Think of it like a cell formula in Excel.

We have put one together for our own extended VBOs (which I can't share) and it cuts down on processing time considerably. The line to create the column is:

collection.Columns.Add(columnName, systemDataType, expression)


The expression syntax is the same as that of the Filter Collection action's Filter parameter: Data Column Expression Property

So, if you have two columns like First Name and Last Name, you can write an expression to get every rows Full Name as:

"[First Name] + ' ' + [Last Name]"
  • Admin
    Eric Wilson
    Reply
    |
    May 2, 2024

    Hi Michael,

    We've just posted v10.2.0 of the Utility - Collection Manipulation VBO with the new action Append Calculated Field. Pretty sure that accomplishes what you were looking for.

    Cheers,

    Eric

  • Micheal Charron
    Reply
    |
    Apr 26, 2024

    Eric,

    I was thinking of an action that would add a new column to an existing input collection, based on an expression. But your second suggestion now has me thinking of a second action now.

    Thanking You

    Micheal Charron

  • Admin
    Eric Wilson
    Reply
    |
    Apr 26, 2024

    Hi Michael,

    Thanks for the idea. Just to be clear, you're looking for an action that will add a new column to an existing input Collection based on an expression or return a new Collection containing the new column?

    Cheers,

    Eric