Replace text displayed for PreferredName

Is there a way to replace the text shown for the preferred name?

My scenario is, if a custom field is showing a value of “Vacant”, we’d like to replace the display of that profile’s name with “Vacant”.

Thanks in advance!

I figured it out

On the box template:

  <div class="field-container header-field">
    <span id="toolTip">  {{PreferredName}} </span>

In the custom Javascript:

renderer.onBoxRendered(function(event, box, itemData){
//Box rendered event
var vacantStatus = itemData[“vacantStatus”];

  if(vacantStatus == 'VACANT'){
     var vacantName = "Vacant";
     var $nameField = box.$elem.find("#toolTip");

1 Like

Hi @cbenson,

Thank you for sharing it with other member of the community!

Anna Dorokhova