
Announcements
PowerApps does not support dynamic table names in LOOKUP() directly, which is why you're seeing the Invalid Argument Type error. Unlike SQL, where you can construct dynamic queries using table names stored in fields, PowerApps requires explicit table references in functions like LOOKUP() and FILTER().
However, there are workarounds that can help you achieve the same goal.
Since PowerApps does not allow dynamic table names in LOOKUP(), one way to achieve this is by predefining the tables in a SWITCH() function:
Switch(
TableAName.Text,
"Employees", LookUp(Employees, EmployeeID = TableAFieldValue, FullName),
"Projects", LookUp(Projects, ProjectID = TableAFieldValue, ProjectName),
"Departments", LookUp(Departments, DeptID = TableAFieldValue, DeptName),
"Clients", LookUp(Clients, ClientID = TableAFieldValue, ClientName),
"Vendors", LookUp(Vendors, VendorID = TableAFieldValue, VendorName),
Blank()
)
SWITCH() function checks the TableAName.Text value.TableAName.Text = "Employees", it will retrieve the FullName from the Employees table.✔ Works well for a known set of tables.
✖ Requires manual updates if new tables are added.