cancel
Showing results for 
Search instead for 
Did you mean: 

How to use UDF values in FSM HTML report?

DAcker
Contributor
0 Kudos

Hello experts, 
I am struggling with the syntax to embed UDF values in FSM HTML Checkout report.

I analyzed the data.js file and the UDF value are displayed in this format:

DAcker_0-1708703030511.png

However, how should the syntax in the template.js look like? I tested different versions (e.g. udf.MILEAGE_NOTES) but they are not working... 

Can someone please help?

DAcker_1-1708703109530.png

Thanks a lot!
Best regards,
Deborah

@krzysztof_szalach Do you have a tip?

View Entire Topic
DAcker
Contributor
0 Kudos

As addition for the community - here the code if there are multiple UDF value and you have to loop over it:

if (columnDefinition.operator == 'concat') {
return columnDefinition.aggregate.map(prop => {
//Custom, UDF handling (line 25-33 custom)
if (prop.startsWith('udfValue.')) {
let udfValue = prop.split('.')[1];
for (const element of context.udfValues){
if (element.meta.name === udfValue){
return element.value;
}
} return "";

} else {
return Handlebars.helpers.get(prop, context);
}
}).reduce((acc, current) => acc + ' ' + current, '');
}