Table function
Applies to: Canvas apps Desktop flows Model-driven apps Power Platform CLI
Creates a temporary table.
Description
The Table function creates a table from an argument list of records or tables.
The result table's columns are the union of all the columns from all the argument records and tables. A blank value is added to any column for which a record doesn't include a value.
A table is a value in Power Apps, just like a string or a number. You can specify a table as an argument for a function, and functions can return a table as a result. Table doesn't create a permanent table. Instead it returns a temporary table made of its arguments. You can specify this temporary table as an argument for another function, visualize it in a gallery, or embed it in another table. Fore more information, see working with tables.
You can also create a single-column table with the [ value1, value2, ... ] syntax.
Syntax
Table( RecordOrTable1 [, RecordOrTable2, ... ] )
- RecordOrTable(s) - Required. The records or table to add to the result table. If a table is provided, the records of the table are added to the resulting table as if they had been individually added.
Table( Untyped )
- Untyped - Required. Untyped object that represents a table or array. Acceptable values are dependent on the untyped provider. For JSON, the untyped object is expected to be a JSON array. Regardless of the content type of the Untyped array, the resulting table is a single-column table of Untyped objects.
Examples
Set the Items property of a listbox to this formula:
Table( {Color: "red"}, {Color: "green"}, {Color: "blue" } )
The listbox shows each color as an option.
Add a text gallery, and set its Items property to this function:
Table( {Item: "Violin123", Location:"France", Owner:"Fabrikam"}, {Item:"Violin456", Location:"Chile"} )
The gallery shows two records, both of which contain the name and location of an item. Only one record contains the name of the owner.
This formula combines standard sizes with extended sizes into a single table
Table( { Value: "XS" }, [ "S", "M", "L" ], { Value: "XL" } )