-1

I am trying to move one collection's single column value to another new collection(let's say collectionB), for doing this I am using calc stage where data is passed one after the another.

In the calc stage I have added the and move it but here in CollectionA.columnname1, columnname1 is dynamic, it's value is a today's date (6/20), I tried concatenation to create CollectionA.6/20 but it's taking it as a string and passing the same value to the collectionB instead of taking the 6/20 column name of the collection A.

esqew
  • 42,425
  • 27
  • 92
  • 132
Anjali
  • 23
  • 1
  • 2
  • 5

1 Answers1

1

To get that done you will need to develop an action in Utility - collection Manipulation.

Please see example code below:

If RowIndex < 0 OrElse Coll.Rows.Count <= RowIndex Then
    Throw New ApplicationException("The supplied row index falls outside of the valid range.")
End If

If Not Coll.Columns.Contains(FieldName) Then
   Throw New ApplicationException("The collection does not contain a field with the name '" & FieldName & "'")
End If

Coll.Rows(RowIndex)(FieldName) = New_Value

Updated_Collection = Coll

There are 5 variables used in that stage:

  • Coll - an input collection
  • RowIndex - the row number into which you want to input variable. First row has number 0.
  • FieldName - column name into which you want to input variable
  • New Value - the value that you want to put into collection
  • Updated_Collection - output collection

Please see image refence:enter image description here

Using that action you can pass a field name to object from variable.

Andrzej Kaczor
  • 1,553
  • 1
  • 11
  • 18