I need help returning two values (tableName and query) to update client-state parameters UI Builder
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I need to update two client-state parameters—tableName and query—when clicking on a data-visualization item in my UI Builder. I’m not sure how to correctly return and assign multiple values. I attempted some code, but it isn’t working. Can someone help me with the proper syntax?
/**
* @param {params} params
* @param {api} params.api
* @param {any} params.event
*/
function evaluateEvent({
api,
event
}) {
var query = event.payload.params.query;
var table = event.payload.params.table;
console.log("query " +query);
console.log("table " +table);
return {
updates: [
{ propName: "queryParam", value: query },
{ propName: "table", value: table }
]
};
}
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I don't have much experience on that so can't help much.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
