Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Uipath core/Xaml-data
Reference · Uipath core

Xaml-data

Part of Uipath core. Install the skill and your agent reads this page when it needs the depth.

Data & File Activities

BuildDataTable, AddDataRow, FilterDataTable, MergeDataTable, SortDataTable, RemoveDuplicateRows, OutputDataTable, JoinDataTables, LookupDataTable, GenerateDataTableFromText, DeserializeJSON, file system operations.

Contents

Build DataTable

Uses TableInfo attribute containing an XSD schema + initial row data, all XML-escaped. Studio generates this — the schema defines columns and types.

⚠️ CRITICAL — BuildDataTable is a SELF-CLOSING tag. It has NO child elements. Columns are defined entirely inside the TableInfo attribute as an XML-escaped XSD schema. ⛔ .Columns property does NOT exist. ⛔ DataTableColumnInfo does NOT exist. Using either causes Cannot set unknown member 'BuildDataTable.Columns' → Studio crash.

→ Use gen_build_data_table() — generates correct XAML deterministically.

Schema column type mapping:

Initial data rows go after </xs:schema> as <TableName> elements.

Add Data Row

→ Use gen_add_data_row() — generates correct XAML deterministically.

Notes:

⚠️ Mixed-type arrays MUST use New Object() syntax: When ArrayRow contains values of different types (strings + numbers + booleans), wrap with New Object(). Plain {val1, val2} only works when all values are strings.

<!-- ❌ WRONG — mixed types without New Object() causes type inference error -->
ArrayRow="[{&quot;GRAND TOTAL&quot;, decGrandTotal, intGrandCount, decGrandAvg}]"

<!-- ✅ RIGHT — New Object() for mixed String + Decimal + Integer -->
ArrayRow="[New Object() {&quot;GRAND TOTAL&quot;, decGrandTotal, intGrandCount, decGrandAvg}]"

Rule: if the array contains ANY non-string value (numeric variables, booleans, expressions returning non-string types) → always use New Object() {}.

Add Data Column (AddDataColumn)

Adds a column to an existing DataTable. Use this instead of InvokeCode to define DataTable schemas. → Use gen_add_data_column() — generates correct XAML deterministically.

For typed columns, change the TypeArguments:

⚠️ Preferred pattern for creating DataTables with columns:

Instead of InvokeCode with New DataTable + dt.Columns.Add(...):

  1. Declare variable with default — in the JSON spec variables array, pass "default": "new DataTable". The generator wraps it in VisualBasicValue automatically.

  2. Add columns — use AddDataColumn activities (one per column): → Use gen_add_data_column() — generates correct XAML deterministically.

This is cleaner than InvokeCode and stays within the low-code paradigm. For aggregation/grouping logic, use Assign or MultipleAssign with LINQ expressions in the Value field (e.g., dt_Data.AsEnumerable().GroupBy(...)) rather than InvokeCode.

Filter Data Table

→ Use gen_filter_data_table() — generates correct XAML deterministically.

Properties:

Merge Data Table

→ Use gen_merge_data_table() — generates correct XAML deterministically.

Properties:

Sort Data Table

→ Use gen_sort_data_table() — generates correct XAML deterministically.

Properties:

⚠️ WRONG property names (common hallucination): OrderByColumnName → use ColumnName. OrderByType → use SortOrder.

Remove Duplicate Rows

→ Use gen_remove_duplicate_rows() — generates correct XAML deterministically.

Properties:

Output Data Table

→ Use gen_output_data_table() — generates correct XAML deterministically.

Properties:

Join Data Tables

→ Use gen_join_data_tables() — generates correct XAML deterministically.

Properties:

Lookup Data Table

→ Use gen_lookup_data_table() — generates correct XAML deterministically.

Properties:

Generate Data Table From Text

→ Use gen_generate_data_table() — generates correct XAML deterministically.

Properties:

Deserialize JSON

Requires xmlns:njl="clr-namespace:Newtonsoft.Json.Linq;assembly=Newtonsoft.Json" for JObject output type. → Use gen_deserialize_json() — generates correct XAML deterministically.

Properties:

File System Activities

⚠️ Exact activity element names (do NOT invent alternatives):

Copy File

→ Use gen_copy_file() — generates correct XAML deterministically.

Move File

→ Use gen_move_file() — generates correct XAML deterministically.

Create Directory

→ Use gen_create_directory() — generates correct XAML deterministically.

Delete File

→ Use gen_delete_file() — generates correct XAML deterministically.

⚠️ DeleteFileX does NOT have ContinueOnError — it's a newer "X" activity that doesn't inherit from legacy ActivityBase. Wrap in TryCatch if you need error suppression.

Path Exists

→ Use gen_path_exists() — generates correct XAML deterministically.

Common File System Patterns

Init phase:
  CreateDirectory → logs folder (from config)
  CreateDirectory → output folder (from config)
  CreateDirectory → archive folder (from config)
  CopyFile → template from Data\ folder to output path

Processing:
  ForEachFileInFolder → iterate files in input folder
    (process each file)
    MoveFile → archive folder after success

Cleanup:
  DeleteFile → temp files
  PathExists → check before operations

Error Handling

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.