UI Builder - Create an event link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 11:48 AM
Hello
I have created table list and when the user click on the table, it links to the list of incident. However, it's not working when i tried to click.
I have 2 parameters (tableName, queryFilter). I'm not sure what's wrong with the script. It seems fine to me.
Thanks.
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
*/
function evaluateEvent({api, event}) {
return {
route: "list-item",
fields: {
tableName: event.payload.params.table,
fields: {"tableName":event.payload.params.table},
params: {"tableName":event.payload.params.table,"queryFilter":event.payload.params.table},
redirect: null,
passiveNavigation: null,
title: null,
multiInstField: null,
targetRoute: null,
external: null,
navigationOptions: null
}
};
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 02:30 PM
Hello, you seem to have a problem on your queryFilter parameter, you did a copy paste from the table parameter:
params: {"tableName":event.payload.params.table,"queryFilter":event.payload.params.table}
I tried just creating a new dashboard in the csm workspace, and adding 1 visualization widget, and using the simplelist page that is available in the workspace it works fine:
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
*/
function evaluateEvent({
api,
event
}) {
return {
route: 'simplelist',
fields: {
table: event.payload.params.table,
},
params: {
query: event.payload.params.query,
listTitle: event.payload.params.listTitle
},
redirect: null,
passiveNavigation: null,
title: null,
multiInstField: null,
targetRoute: null,
external: null
};
}
But again, my solution is based on the simplelist page on the default workspace, you would have to confirm that your list page after fixing the issue mentioned above is indeed expecting the params names you are passing to it.
You also don't need a script, you can just use the low code approach by clicking select destination and selecting the right page, then just configure it as follows:
It will result in the same behaviour.
I hope it helps
Diogo