05-08-19 03:30 PM
If I have a collection named CollectionLabels and the content is below
UI Value Label |Backend ->Fields
Label1 |Backend1
Label2 |Backend2
Label3 |Backend3
How can I edit the 'Label2' to 'Label2_New' by index?
I really want to avoid using the Loop Stage since it's really slow. Is there a way like:
CollectionLabels.UI Value Label (2) = 'Label2_New'
I would really appreciate a fast moving code here.
--------------------------------------------------Answered! Go to Answer.
18-08-20 10:22 PM
Collection.Rows(Convert.ToInt32(Row))(Column) = newVal Modified_Collection = Collection
05-08-19 03:36 PM
This C# stage assumes that the index you're updating is always of type Text. Should be fairly easy to make modifications to accommodate other data types.
Inputs:
Collection - Collection
Row - Number
Column - Number
newVal - Text
Outputs:
Modified Collection - Collection
Collection.Rows[Convert.ToInt32(Row)][Convert.ToInt32(Column)]=newVal; Modified_Collection=Collection;
18-08-20 08:41 PM
18-08-20 09:29 PM
Should look something like this, @EduardoGS_Carva
Collection.Rows(Convert.ToInt32(Row))(Convert.ToInt32(Column)) = newVal Modified_Collection = Collection
18-08-20 09:47 PM
Thanks, Ami, it worked perfectly!
Would there be a simple way to refer to Column by it's Name?
And Row by its Column=1 value (first one)?
Example: I want to change "val4" value, from fourth Row=XYZ and second Column=def, without calling them by Row=4 and Column=2, but by their names, is that possible?
Thanks a lot, other pictures show previous answer worked in VBS Code Stage!
column1 = abc | def | ghi | jkl |
opk | val1 | val5 | val9 |
rst | val2 | val6 | val10 |
uvx | val3 | val7 | val11 |
xyz | val4 | val8 | val12 |
18-08-20 10:22 PM
Collection.Rows(Convert.ToInt32(Row))(Column) = newVal Modified_Collection = Collection
20-08-20 11:52 AM