Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Takes two different datasets and returns a new dataset with the second dataset appended to the first. Will throw an error if the number and types of columns do not match.

Client permissions restrictions


Panel
titleSyntax

system.dataset.appendDataset(dataset1, dataset2)

  • Parameters

Dataset dataset1The dataset that will come first in the returned dataset.

Dataset dataset2The second dataset that will be appended to the end in the returned dataset.

  • Returns

Dataset - A new dataset that is a combination of the original two datasets.

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Examples
Code Block
languagepy
titleCode Snippet
# This example pulls in the datasets from two different Vision table components, combines them, then writes the results to a third table.
# The two source datasets must have the same number and types of columns.

data1 = event.source.parent.getComponent('Table 1').data
data2 = event.source.parent.getComponent('Table 2').data
comboData = system.dataset.appendDataset(data1, data2)
event.source.parent.getComponent('Table 3').data = comboData
Code Block
languagepy
titleCode Snippet
# This code takes datasets from two Vision Power Tables and appends them onto a regular Table.
# Get dataset from first power table
dataset1 = event.source.parent.getComponent('Power Table 1').data

#get dataset from second power table
dataset2 = event.source.parent.getComponent('Power Table 2').data

#use system.dataset.appendDataset() to combine datasets
dataset3 = system.dataset.appendDataset(dataset1, dataset2)

#assign data to third table
event.source.parent.getComponent('Table').data = dataset3
Panel
titleKeywords

system dataset appendDataset, dataset.appendDataset