Versions Compared

Key

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


Panel
titleDescription

Takes a dataset and returns a new dataset with all of the same column names and types, but no rows.

Note_friendly

Datasets are immutable, which means they cannot be directly modified once created. Instead, this scripting function returns a new dataset with some modification applied, which must be assigned to a variable to be used. See Altering a Dataset.

Client permissions restrictions


Panel
titleSyntax

system.dataset.clearDataset(dataset)

  • Parameters

Dataset dataset - The starting dataset.

  • Returns

Dataset - A new dataset with no rows.

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Examples
Code Block
languagepy
titleCode Snippet
# This example pulls in the dataset from a Vision Table component, clears it, then writes the empty dataset back to the table.

data = event.source.parent.getComponent('Table').data
event.source.parent.getComponent('Table').data = system.dataset.clearDataset(data)
Panel
titleKeywords

system dataset clearDataset, dataset.clearDataset