Pular para o conteúdo principal

DataSet

DataSets are how we access a data on a Data² Table. It contains rules and specification on what the data coming from the table is. E.g. In a table of pets, a dataset could only show dogs with brown fur.

Reference

Parameters

master

An automated filter based on another DataSet. Pick a field, a master DataSet, and a Master Field to configure this property. When set, this DataSet will only show entries in which the field has the data equal to the Master Field of the Master DataSet current cursor.

Component data2-core-types@DataSetMaster

filter

Initial Filter settings of this DataSet. Using the interaction "filter" overwrites this setting.

Component data2-core-types@DataSetFilter

fields
list

Of all fields in the Table, what are those you want present in this DataSet? If left empty, will always get all Table fields.

Component data2-core-types@FieldReference

pagination

Limits the amount of data the DataSet retrieves from the table. This can be used to split the amount of records of the DataSet into pages. By default, the DataSet has a limit of 1000 Records.

Component data2-core-primitives@Object

refreshOnEdit

If enabled, forces a refresh before editing the current cursor.

Component data2-core-primitives@Boolean

select

Specify which record should be selected when the DataSet initially loads. Has no effect if the AutoSelect is not enabled.

Component data2-core-types@DataSetSelectSettings

autoSelect

When the DataSet is first loaded in a page, whether it should automatically select its first item or not.

Component data2-core-primitives@Boolean

sort

Sorting settings for the DataSet. Changes the order in which the results show on the DataSet.

Component data2-core-types@DataSetSort

requiresConfirmation

If active, asks the user to confirm deletion before actually deleting the selected records. You may change the type to be an InteractiveModuleReference, and pick a custom DialogService for using a custom Dialog.

Component data2-core-primitives@Boolean

policies
list

Controls for allowing or denying access to the data on the DataSet.

Component data2-core-auth@Policy

pk

Primary field of the table. Should be changed only if the table is a Custom Data Source. Defaults to the "_id" field.

Component data2-core-types@DataSetColumnReference

visibilityMode

Component data2-core-primitives@String

One of 'hide_deleted' | 'only_show_deleted' | 'show_all'

aggregations
list

Configure settings for counting data, filtering, taking averages and other operations for analysing the data on a table.

Component data2-core-registry@DataSetAggregation

lookupDataSets

Component data2-core-primitives@Inferred

lookupPopulateDepths

Component data2-core-primitives@Inferred

Interactions

insert

save

edit

cancel

Arguments

  1. Options data2-core-primitives@Object

Cancel options

delete

refresh

filter

Arguments

  1. Query data2-core-types@FieldSet

Query to filter dataset.

    select

    Arguments

    1. Field data2-core-types@DataSetColumnReference
      required

    Field to be used to select Record.

    1. Field value data2-core-primitives@String
      required

    Value of the field.

    next

    prev

    nextPage

    appendNextPage

    downloadAsCsv

    Arguments

    1. Options data2-core-primitives@Object

    Download as CSV options

    uploadCsv

    Arguments

    1. options data2-core-primitives@Object

    downloadModel

    previousPage

    clearFilters

    paginate

    Arguments

    1. pagination data2-core-primitives@Object

    toggleSort

    Arguments

    1. column data2-core-types@DataSetColumnReference

    sync

    insertRecord

    Arguments

    1. Record No component

    Arguments

    1. Search settings data2-core-primitives@Object

    Search filter

    saveRecord

    Arguments

    1. Record No component

    resetFilters

    sort

    Arguments

    1. Sort settings data2-core-types@FieldSet

    Settings to sort the dataset.

      unselect

      downloadAsXlsx

      Arguments

      1. Options data2-core-primitives@Object

      Options for downloadAsXlsx

      loadAllPages

      exportToCsv

      Arguments

      1. Options data2-core-primitives@Object

      Export to CSV options