List component: change table dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 02:29 AM
Hi developers,
I have the need to use a List component, but with dynamic table and filter, depending on what it's selected from a dropdown component.
I can change the filter easily, but trying to change the table dynamically gives me this error:
The error is: "Exception encountered processing path: /GlideListLayout_Query/getListLayout - Invalid table name [task]"
This is how i'm trying to make the list table dynamic, pretty standard:
filter is a client state changed by the dropdown component:
I can assure you that the dropdown components gives the right table name: incident, task, core_country, etc. It's something about changing the table that breaks the List component. Can it be solved / is there a workaround?
Thanks,
Luca

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 06:19 AM
I did some testing with this and everything worked for me when binding a client state parameter to the table property on the list component and then changing the value of the CSP with a button from incident to sys_user.
The only way I was able to make it throw the error was when I passed it a string that wasn't a valid table name.
How are you setting the table name from the dropdown in the client state parameter? I would look a little more closely into that and log out the value you're setting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 07:34 AM
Hi Brad,
Indeed the problem was about the dropdown. The dropdown components return a json with a property value: ["VALUE"], like: ["task"], or ["incident"]. So payload.value returned a value with brackets. I had to remove the brackets with a script.
Thanks,
Luca