# data/get/

This guide was generated by `xuda-cli`.

You can remove all generated folder guides later with:

~~~bash
npm run clean:readmes
~~~

Use this folder for Xuda `get_data` units.

## What belongs here

- table-backed reads
- filtered or paged list fetches
- array / CSV / JSON loading
- reusable data-loading workflows

## Recommended blocks

- `<meta lang="json5">`
- `<params lang="json5">`
- `<datasource lang="json5">`
- optional `<fields lang="json5">`
- optional `<events lang="json5">`

## Important rules

- define outputs under `params.out`
- if you want the datasource result assigned to a field, set `output` in the datasource
- use readable datasource wrappers such as `type`, `table`, `filter`, `sort`, and `output`

## Example

~~~xml
<meta lang="json5">
{
  id: "load_student_classes",
  menuTitle: "Load Student Roster"
}
</meta>

<params lang="json5">
{
  in: {
    campus_in: "string"
  },
  out: {
    students_out: "array"
  }
}
</params>

<datasource lang="json5">
{
  type: "table",
  table: "student_profiles_table",
  filter: {
    mode: "index",
    activeIndex: "campus_idx",
    indexes: {
      campus_idx: {
        campus: {
          from: "@campus_in",
          to: "@campus_in"
        }
      }
    }
  },
  output: "students_out",
  direction: "asc",
  realtime: true,
  limit: 25
}
</datasource>
~~~
