Skip to content

Instantly share code, notes, and snippets.

<div id="EmployeePhoneField">
<!--#_
var encodedWphone = $htmlEncode(ctx.CurrentItem.Workphone);
var displayWphone = Srch.U.getSingleHHXMLNodeValue(hhProps, "workphone");
console.log(displayWphone);
if ($isEmptyString(displayWphone)) { displayWphone = encodedWphone }
var firstDigitsDisplayWPhone = displayWphone.slice(0,-3);
var lastThreeDigitsWPhone = displayWphone.slice(-3);
_#-->
<div id="EmployeePhoneValue" class="ms-srch-ellipsis" title="_#= encodedWphone =#_">P: _#= firstDigitsDisplayWPhone =#_<strong>_#l=astThreeDigitsWPhone=#_</strong></div>