steven.smith
10/15/2020, 7:50 PMrenderer.addCustomDataSource({
format: render.DataSource.OBJECT,
alias: "results",
data: {results: [{custrecord_lpn_parent : 'LPN00000001'}]}
});
creece
10/15/2020, 7:53 PMrenderer.addCustomDataSource({
format: render.DataSource.JSON,
alias: "results",
data: {results: [{custrecord_lpn_parent : 'LPN00000001'}]}
});
try changing from OBJECT -> JSON in render.DataSourcecreece
10/15/2020, 7:54 PMerictgrubaugh
10/15/2020, 8:32 PMview
custom datasourceerictgrubaugh
10/15/2020, 8:33 PMerictgrubaugh
10/15/2020, 8:33 PMendTime
and runTime
end up just being a string/number, respectively, so nothing complicated theresteven.smith
10/15/2020, 9:22 PMsteven.smith
10/15/2020, 9:25 PMsteven.smith
10/15/2020, 9:26 PMerictgrubaugh
10/15/2020, 9:34 PMresults
with addSearchResults
?erictgrubaugh
10/15/2020, 9:37 PMlet searchResults = s.load(...).run().getRange(...);
let objectResults = searchResults.map((result) => ({
entity: result.getValue({name: "entity"}),
email: result.getValue({name: "email"}),
// ... other fields from the result
});
renderer.addCustomDataSource({
format: render.DataSource.OBJECT,
alias: "results",
data: objectResults
});
erictgrubaugh
10/15/2020, 9:37 PMResult
instances, map
them to Objects instead, then use the Array of Objects as your data sourcesteven.smith
10/15/2020, 9:41 PMsteven.smith
10/15/2020, 9:41 PMrenderer.addCustomDataSource({
format: render.DataSource.OBJECT,
alias: "results",
data: [{entity: 'A', email: '<mailto:a@mail.com|a@mail.com>'}, {entity: 'B', email: '<mailto:b@mail.com|b@mail.com>'}]
});
erictgrubaugh
10/15/2020, 9:42 PMsteven.smith
10/15/2020, 9:42 PMsteven.smith
10/15/2020, 9:42 PMerictgrubaugh
10/15/2020, 9:42 PMsteven.smith
10/15/2020, 9:43 PMsteven.smith
10/15/2020, 9:43 PM{results: [{entity: 'A', email: '<mailto:a@mail.com|a@mail.com>'}, {entity: 'B', email: '<mailto:b@mail.com|b@mail.com>'}]}
steven.smith
10/15/2020, 9:44 PMerictgrubaugh
10/15/2020, 9:44 PM{
format: OBJECT,
alias: "mySearch",
data: { results: [{...}, {...}, {...}]
}
with
<#list mySearch.results as result>
erictgrubaugh
10/15/2020, 9:45 PMsteven.smith
10/15/2020, 9:45 PMsteven.smith
10/15/2020, 9:45 PM<#if json?has_content>
<#assign results = json.results>
</#if>
erictgrubaugh
10/15/2020, 9:45 PMaddSearchResults
to understand how it handles summaries, I don't know what else you can dosteven.smith
10/15/2020, 9:45 PM