Highlighted
Absent Member.
Absent Member.
983 views

How to copy a runtime data table column value to another data table

Hello,

I am trying to copy a row value from a runtime data table to another runtime data table. I tried Get Parameter but it is not giving me the desired output.

Temp = Datatable.LocalSheet.GetParameter("Columnname").Value

I want to copy the entire value in the datatable 1 to datatable 2 during runtime

Table 1 has 3 rows including the header

Name Age

Test 22

AbC 22

Table 2 has two rows including the header

Name Age

Test1 25

I want to append the table 1 values below table 2 values including the header.  Basically I want to merge both the table values in to one including the header. The output should be like

Name Age

Test1 25

Name Age

Test 22

AbC 22

Any suggestion on how can I do that?

0 Likes
1 Reply
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to copy a runtime data table column value to another data table

Your statement looks fine assuming the source data is located on the LocalSheet of the action where the statement is located.

You can drop the value on a named datatable using GetSheet:

Datatable.GetSheet("sheetname").GetParameter("columnname").Value = Temp

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.