I cannot figure out how to solve this and I think it may be because I am making this more complicated than it needs to be… But I need some help.
I am trying to combine two data tables. I have one spreadsheet that I am reading and replacing some values by getting those from another spreadsheet. I have both in Excel sheets read to data tables, but cannot figure out how to replace the values in each Data Row with the values I’m hoping for.
For example, lets say one data table is called dtColors and the other is dtAnimals. I am hoping to replace the first and third values of each row in dtAnimals with values from each row of dtColors.
For example:
dtColors could be: [row 1]: Red, Orange, Yellow, Green
[row 2]: Blue, Indigo, Violet, Black
dtAnimals could be: [row 1]: Lion, Tiger, Bear, Frog
[row 2]: Cow, Horse, Goat, Pig
What I am hoping to get would look like this: [row 1] Red, Tiger, Yellow, Frog
[row 2] Blue, Horse, Violet, Pig
This is a much simpler version of what I am trying to do but I hope that providing an example would be helpful to someone that might be able to help me…
Thank you for the idea - I can see how this could work. I knew it was simpler than I was making it.
However, I am getting an error when trying to assign the row a new value. The error is: Exception Occurred during Process Exception has been thrown by the target of an invocation.
Can you upload or show a snippet of your code in your workflow and the entire exception message (also which activity it stops at). Maybe then I can see the problem.
Sure! The full error is this: Exception Occured during Process Exception has been thrown by the target of an invocation. Source Invoke BuildPartialReport_HRCompRpt workflow: Invoke CombinedToCompComCensus workflow: Assign - Performance Rating
Details for The activity Assign - Performance Rating are
There are two arguments, one called in_DTFormattedCompComCensus and one called io_DTCompComCensusTemplate.
I will need to do this for many columns, but right now I am trying to replace the column “Performance Review Rating” in io_DTCompComCensusTemplate with the value of “Performance Review Rating” from in_DTFormattedCompComCensus.
The second thing I would check is if in_DTFormattedCombined Argument is set as an IN argument in that workflow. Also, verify it has data and that the column exists; you can do this in a Message Box or Write Line by using Output Data Table or hardcoding some values.