assign values to a target cell, based on other cell values in that row?
I would to know how to iterate through a data table and assign values to a target cell, based on other cell values in that row?
0
-
Hi Irene,
To iterate through a data table, use a ForEach(DataRow) activity and use:
Foreach row in dataTable1.Rows.OfType(Of DataRow)
(replacing dataTable1 with your data table variable)
Then you can access cells using the format row("columnname"). For example, you could assign:
row("field3") = CInt(row("field1")) + CInt(row("field 2"))
_img_ alt="iterate through a data table" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000fyDb&feoid=Body&refid=0EMf2000000kAIH"_/_img_
Another option, for a similar end result would be to use the AddDataTableColumn activity. Use the "Expression" property to make the values in the new column populate based on values from other cells. Eg,
Expression: "field1 + field2"
Hope that helps!
-Amanda0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar