Anek Porwal
06/12/2025, 9:12 AMCeligo AI
06/12/2025, 9:13 AMAI generated answer (using internal Slack threads):To get the headers data from Lookup in result mapping, you can use the
column.label
property. This property will give you the label of the column, which is the header in the context of a saved search.
Here is an example of how you can modify your code to get the column labels:
javascript
var searchData = [];
savedSearch.run().each(function(result) {
var rowData = {};
savedSearch.columns.forEach(function(column) {
rowData[column.label] = result.getValue(column);
rowData[column.label + '_text'] = result.getText(column);
});
log.debug('Search Result', rowData);
searchData.push(result);
return true;
});
In this code, column.label
is used instead of column.name
to get the column headers. This will give you the labels (headers) of the columns instead of their internal names.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/12/2025, 9:13 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806444
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.791099846
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.786844373
Celigo AI
06/12/2025, 9:13 AMCeligo AI
06/12/2025, 9:14 AM