Modify Parent breadcrumb (Formatter)

vidhya_mouli
Giga Sage

In my parent breadcrumb, right now it displays only the number field.

pc.setLabelField("number");

 

I need to modify my Macro to display both the number field and first 15 characters of the short description.

Format: "<Number>:<15 first characters of Short Description>..."

How can I get it done?

 

vidhya_mouli_0-1678183737624.png

 

1 ACCEPTED SOLUTION

vidhya_mouli
Giga Sage

Was able to achieve this create a separate field (calculated field). Finally just displayed that field value in the breadcrumb.

View solution in original post

11 REPLIES 11

Hi @vidhya_mouli , 

Can you please check the syntax you used, its setLabel  not setLable

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you

Sorry it is just a typo here. Yes I did use pc.setLabel(current.number + ":" + current.short_description.slice(0, 15) + "..."); 

 

Still does not work.

Hi @vidhya_mouli ,

can you please do some troubleshooting by putting logs as below

gs.log(current.number + ":" + current.short_description.slice(0, 15) + "...");

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you

This did not work either.

 

Hi @vidhya_mouli , 

can you give a try this way 

pc.setLabel(current.getValue('number') + ':' + current.getValue('short_description').substring(0, 15) + '...');
 

I hope this will work

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you