none
SharePoint 2013 Full Text Search Refiners Split RRS feed

  • Question

  • Hi ,

    I have few refiners with multi value in Full Text Search

    eg: <Refiner Name>

    D1,D2

    D3,D4

    D5

    D6

    I want to show the split the refiners and show it as

    <Refiner Name>

    D1

    D2

    D3

    D4

    D5

    D6.

    Tried to split the refiner values array in Filter_Default.html

    But unable to replace the array value


    • Edited by SP_2020 Thursday, February 27, 2020 8:33 AM
    Thursday, February 27, 2020 8:23 AM

Answers

  • <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>MorganNet Multi-value Refinement Item</title>
    
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:CompatibleManagedProperties msdt:dt="string"></mso:CompatibleManagedProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:CompatibleSearchDataTypes msdt:dt="string"></mso:CompatibleSearchDataTypes>
    <mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106604</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Refinement;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://morgannet.morganlewis.net/sites/SearchCenter/_catalogs/masterpage/Display%20Templates/Filters/Filter_MultiValue_ML.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:_dlc_DocId msdt:dt="string">TFCQH52CJAZ6-3-749</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">a9a705f3-dedf-4eb8-a48d-67245d50d9f1</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://morgannet.morganlewis.net/sites/SearchCenter/_layouts/15/DocIdRedir.aspx?ID=TFCQH52CJAZ6-3-749, TFCQH52CJAZ6-3-749</mso:_dlc_DocIdUrl>
    <mso:DefaultCssFile msdt:dt="string"></mso:DefaultCssFile>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor msdt:dt="string">Ross, David H.</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor>
    <mso:DisplayTemplateJSTargetContentType msdt:dt="string"></mso:DisplayTemplateJSTargetContentType>
    <mso:Order msdt:dt="string">27300.0000000000</mso:Order>
    <mso:DisplayTemplateJSTargetScope msdt:dt="string"></mso:DisplayTemplateJSTargetScope>
    <mso:PublishingAssociatedVariations msdt:dt="string"></mso:PublishingAssociatedVariations>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:DisplayTemplateJSTargetControlType msdt:dt="string"></mso:DisplayTemplateJSTargetControlType>
    <mso:DisplayTemplateJSIconUrl msdt:dt="string"></mso:DisplayTemplateJSIconUrl>
    <mso:UIVersion msdt:dt="string"></mso:UIVersion>
    <mso:PublishingAssociatedContentType msdt:dt="string"></mso:PublishingAssociatedContentType>
    <mso:_SourceUrl msdt:dt="string"></mso:_SourceUrl>
    <mso:_SharedFileIndex msdt:dt="string"></mso:_SharedFileIndex>
    <mso:PublishingHidden msdt:dt="string">0</mso:PublishingHidden>
    <mso:DisplayTemplateJSTemplateHidden msdt:dt="string">0</mso:DisplayTemplateJSTemplateHidden>
    <mso:DisplayTemplateJSConfigurationUrl msdt:dt="string"></mso:DisplayTemplateJSConfigurationUrl>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:DisplayTemplateJSTemplateType msdt:dt="string"></mso:DisplayTemplateJSTemplateType>
    <mso:DisplayTemplateJSTargetListTemplate msdt:dt="string"></mso:DisplayTemplateJSTargetListTemplate>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author msdt:dt="string">Daffe, Amadou</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author>
    <mso:DisplayTemplateLevel msdt:dt="string"></mso:DisplayTemplateLevel>
    <mso:ManagedPropertyMapping msdt:dt="string"></mso:ManagedPropertyMapping>
    <mso:PublishingPreviewImage msdt:dt="string"></mso:PublishingPreviewImage>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties></xml><![endif]-->
    </head>
    <body>
    <script>
     $includeScript(this.url, "~Sitecollection/Style Library/EDMS/resource/EDMSAttributeResource.js");
     $includeScript("", "~sitecollection/_catalogs/masterpage/Display Templates/Filters/Filter_MultiValue_Body_ML.js");
    </script>
    <div id="Filter_MultiValue">
    <!--#_
    var Options = {
        ShowCounts: false
    };
    
    var listData = ctx.ListData;
    var hasControl = !$isNull(ctx.RefinementControl) && !$isNull(ctx.ClientControl);
    
    
    
    
    if(hasControl) {
        var hasNoListData = ($isEmptyArray(listData));
    
        var propertyName = ctx.RefinementControl.propertyName;
        var displayTitle = Srch.Refinement.getRefinementTitle(ctx.RefinementControl);
        var isExpanded = Srch.Refinement.getExpanded(ctx.RefinementControl.propertyName);
     
        var initialLoadCompleted = ctx.RefinementControl["mlb_initialLoadCompleted"] || false;
        var useContains = false;
        var useKQL = false;
        var refiners = [];
    
    
    	//when a user clicks/unclicks the checkbox, this gets triggered so we know 
    	//which was the last thing selected/unselected.  This enables the ability to reshow last shown filters instead 
    	//of the default behavior of only showing the items that were selected.
    	//ctx.ClientControl["mlb_lastRefinementProperty"] = ctx.ClientControl["mlb_lastRefinementProperty"] || "";
    	//ctx.ClientControl["mlb_lastRefinementValue"] = ctx.ClientControl["mlb_lastRefinementValue"] || "";
    	//ctx.ClientControl["mlb_lastRefinementIsSelected"] = ctx.ClientControl["mlb_lastRefinementIsSelected"] || null;
    	//ctx.ClientControl["mlb_lastRefiners"] = ctx.ClientControl["mlb_lastRefiners"] || null;
    	ctx.ClientControl.mlb_OnBeforeRefinementChecked = function(property, refinementValue, selected){
    		//this["mlb_lastRefinementProperty"] = property;
    		//this["mlb_lastRefinementValue"] = refinementValue;
    		//this["mlb_lastRefinementIsSelected"] = selected;
    		//this["mlb_lastRefiners"] = this.mlb_PreviousRefiners[property];
    		
    		
    	};
    
    
    	//get the previously shown refiners for the refinement property that was just clicked
    	//and determine if the refiners for this property should be re-used or if they need to be refreshed.
    	if (!$isNull(ctx.ClientControl.mlb_lastRefiners) && (ctx.ClientControl.mlb_lastRefinementProperty == ctx.RefinementControl.propertyName)){
    		refiners = ctx.ClientControl.mlb_lastRefiners;
    		var isSelected = ctx.ClientControl.mlb_lastRefinementIsSelected;
    		
    		//set the IsSelected property for the item that was just selected/unselected
    		jQuery.each(refiners, function(i, refiner){
    			if (refiner.RefinementName == ctx.ClientControl.mlb_lastRefinementValue){
    				refiner.IsSelected = isSelected;
    			}
    		});
    	
    		//determine if this was the last unselect (no more selections in this property group)
    		var selectedRefiners = jQuery.grep( refiners, function(n,i) {
        		return n.IsSelected == true;
    		});
    
    		if (selectedRefiners.length < 1){
    			refiners = [];
    		}
    		
    		//reset so that upon a clear filter event, we don't force the last refiners to be shown again.
    		ctx.ClientControl.mlb_lastRefiners = null;
    	}
    	var delimiter = ',';
    	
    	//the default behavior.  will also hit this if the user was in the process of unselecting refiners and the item was unchecked (see above).
    	if (refiners.length == 0) 
    	{
    	    var currentRefinementCategory = ctx.ClientControl.getCurrentRefinementCategory(ctx.RefinementControl.propertyName);
    	    var hasAnyFilterTokens = (!$isNull(currentRefinementCategory) && currentRefinementCategory.get_tokenCount() > 0);
    	    var renderEmptyContainer = hasControl && (hasNoListData && !hasAnyFilterTokens);
    	    if(!renderEmptyContainer) {
    	        var listDataTokenToDisplayMap = {};
    	        var listDataTokenToCountMap = {};
    	        if(!hasNoListData) {
    	            for (var i = 0; i < listData.length; i++) {
    	                var filter = listData[i];
    	                if(!$isNull(filter)) {
    					
    					var originalRefinementName = filter.RefinementName.split(delimiter);
    					
    					
    					for (var j = 0; j < originalRefinementName.length; j++){						
                            var refinementToken = (originalRefinementName[j].indexOf('\\') > -1) ? originalRefinementName[j] : '"' + originalRefinementName[j] + '"';
    						if (typeof listDataTokenToDisplayMap[refinementToken] == 'undefined') {
    							listDataTokenToDisplayMap[refinementToken] = originalRefinementName[j];
    							listDataTokenToCountMap[refinementToken] = filter.RefinementCount;
    							if(!hasAnyFilterTokens && !$isEmptyString(originalRefinementName[j]) && !$isEmptyString(refinementToken)) {
    								refiners.push(
    								{   
    									RefinementName: originalRefinementName[j],
    									RefinementToken: refinementToken,
    									RefinementCount: filter.RefinementCount,
    									IsSelected: false
    								});
    							}
    						}
    					}
    					
    	                 /*   listDataTokenToDisplayMap[filter.RefinementToken] = filter.RefinementName;
    	                    listDataTokenToCountMap[filter.RefinementToken] = filter.RefinementCount;
    	                    if(!hasAnyFilterTokens && !$isEmptyString(filter.RefinementName) && !$isEmptyString(filter.RefinementToken)) {
    	                        refiners.push(
    	                        {   
    	                            RefinementName: filter.RefinementName,
    	                            RefinementToken: filter.RefinementToken,
    	                            RefinementCount: filter.RefinementCount,
    	                            IsSelected: false
    	                        });
    	                    }*/
    	                }
    	            }
    	        }
    	        if(hasAnyFilterTokens) {
    	            for(var j = 0; j < currentRefinementCategory.get_tokenCount(); j++) {
    	                var token = currentRefinementCategory.t[j];
    	                var displayValue = listDataTokenToDisplayMap[token];
    	                if($isEmptyString(displayValue) && !$isNull(currentRefinementCategory.m)) {
    	                    displayValue = currentRefinementCategory.m[token];
    	                }
    	                if(!$isEmptyString(displayValue) && !$isEmptyString(token))
    	                {
    	                    refiners.push(
    	                    {   
    	                        RefinementName: displayValue,
    	                        RefinementToken: token,
    	                        RefinementCount: !$isNull(listDataTokenToCountMap[token]) ? listDataTokenToCountMap[token] : 0,
    	                        IsSelected: true
    	                    });
    	                }
    	            }
    	        }
    	    }
        }
        
    	if (initialLoadCompleted){
        	//keep the setting while user is on the same page
        	Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, isExpanded);
        } else {
        	//on first load always set collapsed...unless we meet conditions later
        	//Commented out Automatic collapse Item will show expanded
        	//Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, false);
        }
        //always show the Availability refiner...
        if (propertyName.toLowerCase() == "aplevel"){
    	    Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, true);
        }
        
        //show other refiners if they have a selected item (i.e. the user previous expanded and selected a refiner)
        for (var i = 0; i < refiners.length; i++) {
    		if (refiners[i].IsSelected) {
    			Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, true);
    			break;
    		}
    	}
    
        
        
        ctx["DisplayTemplateData"]["BodyTemplateId"] = "~sitecollection/_catalogs/masterpage/Display Templates/Filters/Filter_MultiValue_Body_ML.js";
        ctx.RefinementControl["csr_propertyName"] = propertyName;
        ctx.RefinementControl["csr_displayTitle"] = displayTitle;
        ctx.RefinementControl["csr_filters"] = refiners;
        
        var mlb_PreviousRefiners = ctx.ClientControl["mlb_PreviousRefiners"] || {};
        mlb_PreviousRefiners[propertyName] = refiners; 
        ctx.ClientControl["mlb_PreviousRefiners"] = mlb_PreviousRefiners;
        
        ctx.RefinementControl["csr_isExpanded"] = isExpanded;
        ctx.RefinementControl["csr_renderEmptyContainer"] = renderEmptyContainer;
        ctx.RefinementControl["csr_useContains"] = useContains;
        ctx.RefinementControl["csr_useKQL"] = useKQL;
        ctx.RefinementControl["csr_showCounts"] = Options.ShowCounts;
    
    _#-->
            _#= ctx.RenderBody(ctx) =#_
    <!--#_
    	ctx.RefinementControl["mlb_initialLoadCompleted"] = true;
    }
    
    
    
    _#-->
        </div>
    </body>
    </html>
    

    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>Multi-value Refinement Item Body</title>
    
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:CompatibleManagedProperties msdt:dt="string"></mso:CompatibleManagedProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:CompatibleSearchDataTypes msdt:dt="string"></mso:CompatibleSearchDataTypes>
    <mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106604</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Refinement;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://edms.qa.jp.nissan.biz/_catalogs/masterpage/Display Templates/Filters/Filter_MultiValue_Body_ML.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:_dlc_DocId msdt:dt="string">TMZYZ7A64TV3-2036621469-579</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">e765f37c-a77b-40bf-97bc-a3a45abfcc72</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://edms.qa.jp.nissan.biz/_layouts/15/DocIdRedir.aspx?ID=TMZYZ7A64TV3-2036621469-579, TMZYZ7A64TV3-2036621469-579</mso:_dlc_DocIdUrl>
    <mso:DefaultCssFile msdt:dt="string"></mso:DefaultCssFile>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor msdt:dt="string">Mann, Steven</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor>
    <mso:DisplayTemplateJSTargetContentType msdt:dt="string"></mso:DisplayTemplateJSTargetContentType>
    <mso:Order msdt:dt="string">27400.0000000000</mso:Order>
    <mso:DisplayTemplateJSTargetScope msdt:dt="string"></mso:DisplayTemplateJSTargetScope>
    <mso:PublishingAssociatedVariations msdt:dt="string"></mso:PublishingAssociatedVariations>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:DisplayTemplateJSTargetControlType msdt:dt="string"></mso:DisplayTemplateJSTargetControlType>
    <mso:DisplayTemplateJSIconUrl msdt:dt="string"></mso:DisplayTemplateJSIconUrl>
    <mso:UIVersion msdt:dt="string"></mso:UIVersion>
    <mso:PublishingAssociatedContentType msdt:dt="string"></mso:PublishingAssociatedContentType>
    <mso:_SourceUrl msdt:dt="string"></mso:_SourceUrl>
    <mso:_SharedFileIndex msdt:dt="string"></mso:_SharedFileIndex>
    <mso:PublishingHidden msdt:dt="string">0</mso:PublishingHidden>
    <mso:DisplayTemplateJSTemplateHidden msdt:dt="string">0</mso:DisplayTemplateJSTemplateHidden>
    <mso:DisplayTemplateJSConfigurationUrl msdt:dt="string"></mso:DisplayTemplateJSConfigurationUrl>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:DisplayTemplateJSTemplateType msdt:dt="string"></mso:DisplayTemplateJSTemplateType>
    <mso:DisplayTemplateJSTargetListTemplate msdt:dt="string"></mso:DisplayTemplateJSTargetListTemplate>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author msdt:dt="string">Daffe, Amadou</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author>
    <mso:DisplayTemplateLevel msdt:dt="string"></mso:DisplayTemplateLevel>
    <mso:ManagedPropertyMapping msdt:dt="string"></mso:ManagedPropertyMapping>
    <mso:PublishingPreviewImage msdt:dt="string"></mso:PublishingPreviewImage>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties></xml><![endif]-->
    </head>
    <body>
    
    <script>
     $includeScript(this.url, "~Sitecollection/Style Library/EDMS/resource/EDMSAttributeResource.js");
    
    </script>
    
    <div id="Filter_MultiValue_Body">
    <!--#_
    
    var propertyName = ctx.RefinementControl["csr_propertyName"];
    var displayTitle = ctx.RefinementControl["csr_displayTitle"];
    var filters = ctx.RefinementControl["csr_filters"];
    var isExpanded = Srch.Refinement.getExpanded(ctx.RefinementControl.propertyName);
    var renderEmptyContainer = Boolean(ctx.RefinementControl["csr_renderEmptyContainer"]);
    var useContains = Boolean(ctx.RefinementControl["csr_useContains"]);
    var useKQL = Boolean(ctx.RefinementControl["csr_useKQL"]);
    var showCounts = Boolean(ctx.RefinementControl["csr_showCounts"]);
    
    if($isEmptyString(propertyName) || (!$isNull(renderEmptyContainer) && renderEmptyContainer))
    { 
    _#-->
            <div id="EmptyContainer"></div>
    <!--#_
    } 
    else if(!$isNull(filters) && Srch.U.isArray(filters) && !$isEmptyArray(filters))
    { 
        var expandedStatus = !$isNull(isExpanded) ? isExpanded : false;
        var iconClass = "ms-core-listMenu-item ";
        iconClass += ((expandedStatus == "true") ? "ms-ref-uparrow" : "ms-ref-downarrow");
       
      //  var iconClass = (isExpanded == "true"? "ms-ref-uparrow" : "ms-ref-downarrow");
       
    	var displayStyle = ((expandedStatus == "true") ? "" : "none");
    	
    
    _#-->
            <div id="Container" >
    		
    	
                _#= Srch.U.collapsibleRefinerTitle(propertyName, ctx.ClientControl.get_id(), displayTitle, iconClass) =#_
    			
    			
    			
    		    <div id='UnselectedSection' class='ms-ref-unselSec' style='display:_#= $htmlEncode(displayStyle) =#_'>
    		  
    		  
                   <div  id="unselShortList" class="ms-ref-unsel-shortList" > 
                
    
    					<!--#_ 
    					
    	
    					
    						//custom sorting to position Within Week One before Week Within week 2 
    							if (propertyName != null && propertyName.toLowerCase() == "apupdate"){
    							swapFilters(filters, 0, 1);
    							function swapFilters(array, indexA, indexB) {
    							  var tmp = array[indexB];
    							  array[indexB] = array[indexA];
    							  array[indexA] = tmp;
    							}
    							
    						}
    
    						//custom sorting to position Low after Medium for the Availability refinement
    						if (propertyName != null && propertyName.toLowerCase() == "aplevel"){
    						
    						
    							filters.sort(function(a,b){ 
    								//create a javascript object with property names corresponding to the values we want to ensure are sorted correctly,
    								//, and give the property names a numeric value corresponding to the ordering.
    								
    								var customSort = {high:1, medium:2, low:3};
    								var a1=a.RefinementName.toLowerCase(), b1= b.RefinementName.toLowerCase();
    								
    								//prepend the ordering if applicable (if not default to 999 so that these appear lower in the list)
    								a1 = (customSort[a1] || 999) + a1;
    								b1 = (customSort[b1] || 999) + b1;
    						
    								//standard checks for equality and lt/gt comparisons...
    							    if(a1== b1) return 0;
    							    return (a1 > b1) ? 1 : -1;
    							 });	
    						}
    						
    					    for (var i = 0; i < filters.length; i++){
    					        var filter = filters[i];
    					        if(!$isNull(filter)){
    					            var isSelected = Boolean(filter.IsSelected);
    					            var isDisabled = Boolean(filter.IsDisabled);
    					            var inputName = propertyName + '_ChkGroup';
    					            var inputId = inputName + "_" + filter.RefinementName;
    								var nameClass = "ms-ref-name ms-displayBlock " + (showCounts ? "ms-displayInline" : "ms-displayInlineBlock ms-ref-ellipsis");
    								//var nameClass = "ms-ref-name " + (showCounts ? "ms-displayInline" : "ms-ref-ellipsis");
    								var fontWeight = "normal";
    								var displayValue = "inherit";
    								
    								
    								var refinementName = filter.RefinementName;
    								
    								if (isDisabled) { 
    									displayValue = "none"; 
    								}
    
    								
    								
    								_#-->
    								
    								
    								
    								<div id="Value" name='Item'>
    									<span style="float:left">
    										<!--#_if(isSelected) {fontWeight = "bold";_#-->
    										<input type="checkbox" onclick=" $getClientControl(this).mlb_OnBeforeRefinementChecked('_#= $scriptEncode(propertyName) =#_', '_#= filter.RefinementName =#_', false); Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_); var e = jQuery.Event('custom'); $('body').trigger(e); setTimeout(function() {EDMS.util.wordRefineryReplace('#RefinementName',labeldatRegistration);EDMS.util.wordDomReplace('.askAttrTableContent')},1500);" class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_"  checked="" />
    									
    								<!--	<input type="checkbox" onclick="Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_);" class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_"  checked="" />-->
    										
    										
    										<!--#_}else {if (isDisabled) {fontWeight = "200";_#-->
    									    <input type="checkbox" visible="" disabled="disabled" onclick="Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_); "  class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_" />
    										
    										<!--#_}else {_#-->
    									    <input type="checkbox" onclick=" $getClientControl(this).mlb_OnBeforeRefinementChecked('_#= $scriptEncode(propertyName) =#_', '_#= filter.RefinementName =#_', true); Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_); var e = jQuery.Event('custom'); $('body').trigger(e); " class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_" />
    									
    										<!--#_}}_#-->
    									</span>
    								
    										
    										<!--  <div id='RefinementName' class='_#= nameClass =#_'> _#= $htmlEncode(filter.RefinementName) =#_</div>-->
    										<div id='RefinementName' class='_#= nameClass =#_' title='_#= $htmlEncode(refinementName) =#_'> _#= $htmlEncode(refinementName) =#_</div>
    										
    										<!--#_if (showCounts) {_#-->
    										<!--<span style=" ; right:0; top:2px"><span id='RefinementCount' class='ms-ref-count ms-textSmall'> (_#= $htmlEncode(Srch.U.toFormattedNumber(filter.RefinementCount)) =#_) </span></span>-->
    									
    										<!--#_}_#-->
    									</div>
    									
    									
    
    							<!--#_
    							
    							        }
    									
    									
    							    }
    								
    							var stLang = Number(JSON.parse(localStorage.getItem(EDMS.common.LANGUAGE_KEY)));
    		
    
    			//console.log("stLang" +stLang);
    			 $(".ms-displayBlock").each(function(){
    			 
    			 $(this).mouseover(function(){
    			 
    			 //console.log("this");
    			
    			if(stLang == 1)
    			{
    			//console.log(stLang);
    			//$(this).attr('title','test');
    			$(this).attr('title', EDMS.util.wordHoverReplace('#Refinement',labeldatRegistration));
    		
    			}
    			
    		
    			});
    			});
    								
    							    
    							_#-->
    							
    							 
    
                        
                    </div>
             
    <!--#_
    }
    _#-->
        </div>
    </div>
    </div>
    </body>
    </html>
    

    I have created a new Filter Refinement Panel and it worked
    • Marked as answer by SP_2020 Tuesday, May 5, 2020 7:27 AM
    Tuesday, May 5, 2020 7:26 AM

All replies

  • Have you gone to the refiner and unchecked the "Allow Multiple Values"?

    If this is helpful please mark it so. Also if this solved your problem mark as answer.

    Thursday, February 27, 2020 2:46 PM
  • Checked in Search Schema, the Allow Multiple Values are unchecked .

    Actually the input for those columns are multiple selection. 

    I want to break it the refiners value in Full Text Search 

    Current Refiner 

    I want the display as 

    A-PF

    B-PF

    C-PF

    D-PF

    ........

    Please help to solve the above

    
    • Edited by SP_2020 Friday, February 28, 2020 6:59 AM
    Friday, February 28, 2020 4:14 AM
  • Hi,

    Please check “Allow multiple values ” for the managed property under Search Schema and then do a full crawl under Content Sources.

    It allows each property value to be stored separately in this managed property.

    Here’s an example.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, February 28, 2020 8:55 AM
  • Hi,

    I checked the Search Schema for the Refiner  for the managed property, Allow multiple values are unchecked.

    Friday, February 28, 2020 9:20 AM
  • Hi,

    You need to check the option.

    This option is meant for storing multiple values separately.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, February 28, 2020 9:23 AM
  • agree with Chelsea. I made an error in my original comment. I was meant to say CHECKED

    If this is helpful please mark it so. Also if this solved your problem mark as answer.

    Friday, February 28, 2020 2:14 PM
  • I tried by checking the checkbox and completed the full crawl.

    But the issue is same.


    Monday, March 2, 2020 5:17 AM
  • I tried this option but the issue remains the same.
    Monday, March 2, 2020 5:17 AM
  • Hi Chelsea,

    I want to implement the changes in Filter_Default.html not in Filter_MultiValue.html


    Monday, March 2, 2020 10:55 AM
  • Hi,

    You can simply change the refiner template via Search Result page > Edit page > Refinement web part > Choose Refiners and switch “Display template” to “Refinement Item”, so it does not allow to select multiple refiner values.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, March 3, 2020 2:09 AM
  • Currently i am using Refinement Item Display Template only.

    I have checked the "Allow Multiple Values" checkbox in Search schema and successfully ran the Full crawl.

    But the situation is same.

    
    • Edited by SP_2020 Tuesday, March 3, 2020 6:47 AM
    Tuesday, March 3, 2020 6:40 AM
  • Hi,

    I’m not sure why it doesn’t work for you, so I will share my configuration process here:

    1. After creating a new Multiple-Choice column, a crawled property will be automatically created under Search Schema > Crawled Properties. If not, a full crawl should make the properties visible in the list.

    For example, I have created a multi-choice filed named “Required capabilities”, the crawled property will be named “ows_Required_x0020_capabilities”.

    2. Create a new managed property via Central Administration > Search Service Application > Search Schema > New Managed Property and set it as following:

    Do another full crawl under Content Sources.

    3. Navigate to search center and then edit the search result page. Add “Required capabilities” from the Available refiners list and name the refiner “RC”. The refiner will use "Refinement Item" as Display template by default.

    4. Save and then publish the search result page.

    Here’s the test result.

    Please check if you have configured the refiner properly. Double check if you have mapped the managed property to the right crawled property. Test with a new multi-choice column if necessary.

    In addition, check the Crawl Log in the Search Service Application to rule out potential error messages.

    Here’s your reference.

    How to add refiners to your search results page in SharePoint Server.

    https://docs.microsoft.com/en-us/sharepoint/search/how-to-add-refiners-to-your-search-results-page

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, March 3, 2020 8:43 AM
  • Hi,

    Please remember to update this thread if you have any progress.

    Thank you for your understanding.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, March 9, 2020 2:29 AM
  • Currently i am changing the script in Filter_Default.html using splitting the delimiter.

    But duplicate values coming.

    Working on it.

    Once it get solution, i will update it

    Monday, March 9, 2020 2:47 AM
  • <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>MorganNet Multi-value Refinement Item</title>
    
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:CompatibleManagedProperties msdt:dt="string"></mso:CompatibleManagedProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:CompatibleSearchDataTypes msdt:dt="string"></mso:CompatibleSearchDataTypes>
    <mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106604</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Refinement;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://morgannet.morganlewis.net/sites/SearchCenter/_catalogs/masterpage/Display%20Templates/Filters/Filter_MultiValue_ML.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:_dlc_DocId msdt:dt="string">TFCQH52CJAZ6-3-749</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">a9a705f3-dedf-4eb8-a48d-67245d50d9f1</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://morgannet.morganlewis.net/sites/SearchCenter/_layouts/15/DocIdRedir.aspx?ID=TFCQH52CJAZ6-3-749, TFCQH52CJAZ6-3-749</mso:_dlc_DocIdUrl>
    <mso:DefaultCssFile msdt:dt="string"></mso:DefaultCssFile>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor msdt:dt="string">Ross, David H.</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor>
    <mso:DisplayTemplateJSTargetContentType msdt:dt="string"></mso:DisplayTemplateJSTargetContentType>
    <mso:Order msdt:dt="string">27300.0000000000</mso:Order>
    <mso:DisplayTemplateJSTargetScope msdt:dt="string"></mso:DisplayTemplateJSTargetScope>
    <mso:PublishingAssociatedVariations msdt:dt="string"></mso:PublishingAssociatedVariations>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:DisplayTemplateJSTargetControlType msdt:dt="string"></mso:DisplayTemplateJSTargetControlType>
    <mso:DisplayTemplateJSIconUrl msdt:dt="string"></mso:DisplayTemplateJSIconUrl>
    <mso:UIVersion msdt:dt="string"></mso:UIVersion>
    <mso:PublishingAssociatedContentType msdt:dt="string"></mso:PublishingAssociatedContentType>
    <mso:_SourceUrl msdt:dt="string"></mso:_SourceUrl>
    <mso:_SharedFileIndex msdt:dt="string"></mso:_SharedFileIndex>
    <mso:PublishingHidden msdt:dt="string">0</mso:PublishingHidden>
    <mso:DisplayTemplateJSTemplateHidden msdt:dt="string">0</mso:DisplayTemplateJSTemplateHidden>
    <mso:DisplayTemplateJSConfigurationUrl msdt:dt="string"></mso:DisplayTemplateJSConfigurationUrl>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:DisplayTemplateJSTemplateType msdt:dt="string"></mso:DisplayTemplateJSTemplateType>
    <mso:DisplayTemplateJSTargetListTemplate msdt:dt="string"></mso:DisplayTemplateJSTargetListTemplate>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author msdt:dt="string">Daffe, Amadou</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author>
    <mso:DisplayTemplateLevel msdt:dt="string"></mso:DisplayTemplateLevel>
    <mso:ManagedPropertyMapping msdt:dt="string"></mso:ManagedPropertyMapping>
    <mso:PublishingPreviewImage msdt:dt="string"></mso:PublishingPreviewImage>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties></xml><![endif]-->
    </head>
    <body>
    <script>
     $includeScript(this.url, "~Sitecollection/Style Library/EDMS/resource/EDMSAttributeResource.js");
     $includeScript("", "~sitecollection/_catalogs/masterpage/Display Templates/Filters/Filter_MultiValue_Body_ML.js");
    </script>
    <div id="Filter_MultiValue">
    <!--#_
    var Options = {
        ShowCounts: false
    };
    
    var listData = ctx.ListData;
    var hasControl = !$isNull(ctx.RefinementControl) && !$isNull(ctx.ClientControl);
    
    
    
    
    if(hasControl) {
        var hasNoListData = ($isEmptyArray(listData));
    
        var propertyName = ctx.RefinementControl.propertyName;
        var displayTitle = Srch.Refinement.getRefinementTitle(ctx.RefinementControl);
        var isExpanded = Srch.Refinement.getExpanded(ctx.RefinementControl.propertyName);
     
        var initialLoadCompleted = ctx.RefinementControl["mlb_initialLoadCompleted"] || false;
        var useContains = false;
        var useKQL = false;
        var refiners = [];
    
    
    	//when a user clicks/unclicks the checkbox, this gets triggered so we know 
    	//which was the last thing selected/unselected.  This enables the ability to reshow last shown filters instead 
    	//of the default behavior of only showing the items that were selected.
    	//ctx.ClientControl["mlb_lastRefinementProperty"] = ctx.ClientControl["mlb_lastRefinementProperty"] || "";
    	//ctx.ClientControl["mlb_lastRefinementValue"] = ctx.ClientControl["mlb_lastRefinementValue"] || "";
    	//ctx.ClientControl["mlb_lastRefinementIsSelected"] = ctx.ClientControl["mlb_lastRefinementIsSelected"] || null;
    	//ctx.ClientControl["mlb_lastRefiners"] = ctx.ClientControl["mlb_lastRefiners"] || null;
    	ctx.ClientControl.mlb_OnBeforeRefinementChecked = function(property, refinementValue, selected){
    		//this["mlb_lastRefinementProperty"] = property;
    		//this["mlb_lastRefinementValue"] = refinementValue;
    		//this["mlb_lastRefinementIsSelected"] = selected;
    		//this["mlb_lastRefiners"] = this.mlb_PreviousRefiners[property];
    		
    		
    	};
    
    
    	//get the previously shown refiners for the refinement property that was just clicked
    	//and determine if the refiners for this property should be re-used or if they need to be refreshed.
    	if (!$isNull(ctx.ClientControl.mlb_lastRefiners) && (ctx.ClientControl.mlb_lastRefinementProperty == ctx.RefinementControl.propertyName)){
    		refiners = ctx.ClientControl.mlb_lastRefiners;
    		var isSelected = ctx.ClientControl.mlb_lastRefinementIsSelected;
    		
    		//set the IsSelected property for the item that was just selected/unselected
    		jQuery.each(refiners, function(i, refiner){
    			if (refiner.RefinementName == ctx.ClientControl.mlb_lastRefinementValue){
    				refiner.IsSelected = isSelected;
    			}
    		});
    	
    		//determine if this was the last unselect (no more selections in this property group)
    		var selectedRefiners = jQuery.grep( refiners, function(n,i) {
        		return n.IsSelected == true;
    		});
    
    		if (selectedRefiners.length < 1){
    			refiners = [];
    		}
    		
    		//reset so that upon a clear filter event, we don't force the last refiners to be shown again.
    		ctx.ClientControl.mlb_lastRefiners = null;
    	}
    	var delimiter = ',';
    	
    	//the default behavior.  will also hit this if the user was in the process of unselecting refiners and the item was unchecked (see above).
    	if (refiners.length == 0) 
    	{
    	    var currentRefinementCategory = ctx.ClientControl.getCurrentRefinementCategory(ctx.RefinementControl.propertyName);
    	    var hasAnyFilterTokens = (!$isNull(currentRefinementCategory) && currentRefinementCategory.get_tokenCount() > 0);
    	    var renderEmptyContainer = hasControl && (hasNoListData && !hasAnyFilterTokens);
    	    if(!renderEmptyContainer) {
    	        var listDataTokenToDisplayMap = {};
    	        var listDataTokenToCountMap = {};
    	        if(!hasNoListData) {
    	            for (var i = 0; i < listData.length; i++) {
    	                var filter = listData[i];
    	                if(!$isNull(filter)) {
    					
    					var originalRefinementName = filter.RefinementName.split(delimiter);
    					
    					
    					for (var j = 0; j < originalRefinementName.length; j++){						
                            var refinementToken = (originalRefinementName[j].indexOf('\\') > -1) ? originalRefinementName[j] : '"' + originalRefinementName[j] + '"';
    						if (typeof listDataTokenToDisplayMap[refinementToken] == 'undefined') {
    							listDataTokenToDisplayMap[refinementToken] = originalRefinementName[j];
    							listDataTokenToCountMap[refinementToken] = filter.RefinementCount;
    							if(!hasAnyFilterTokens && !$isEmptyString(originalRefinementName[j]) && !$isEmptyString(refinementToken)) {
    								refiners.push(
    								{   
    									RefinementName: originalRefinementName[j],
    									RefinementToken: refinementToken,
    									RefinementCount: filter.RefinementCount,
    									IsSelected: false
    								});
    							}
    						}
    					}
    					
    	                 /*   listDataTokenToDisplayMap[filter.RefinementToken] = filter.RefinementName;
    	                    listDataTokenToCountMap[filter.RefinementToken] = filter.RefinementCount;
    	                    if(!hasAnyFilterTokens && !$isEmptyString(filter.RefinementName) && !$isEmptyString(filter.RefinementToken)) {
    	                        refiners.push(
    	                        {   
    	                            RefinementName: filter.RefinementName,
    	                            RefinementToken: filter.RefinementToken,
    	                            RefinementCount: filter.RefinementCount,
    	                            IsSelected: false
    	                        });
    	                    }*/
    	                }
    	            }
    	        }
    	        if(hasAnyFilterTokens) {
    	            for(var j = 0; j < currentRefinementCategory.get_tokenCount(); j++) {
    	                var token = currentRefinementCategory.t[j];
    	                var displayValue = listDataTokenToDisplayMap[token];
    	                if($isEmptyString(displayValue) && !$isNull(currentRefinementCategory.m)) {
    	                    displayValue = currentRefinementCategory.m[token];
    	                }
    	                if(!$isEmptyString(displayValue) && !$isEmptyString(token))
    	                {
    	                    refiners.push(
    	                    {   
    	                        RefinementName: displayValue,
    	                        RefinementToken: token,
    	                        RefinementCount: !$isNull(listDataTokenToCountMap[token]) ? listDataTokenToCountMap[token] : 0,
    	                        IsSelected: true
    	                    });
    	                }
    	            }
    	        }
    	    }
        }
        
    	if (initialLoadCompleted){
        	//keep the setting while user is on the same page
        	Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, isExpanded);
        } else {
        	//on first load always set collapsed...unless we meet conditions later
        	//Commented out Automatic collapse Item will show expanded
        	//Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, false);
        }
        //always show the Availability refiner...
        if (propertyName.toLowerCase() == "aplevel"){
    	    Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, true);
        }
        
        //show other refiners if they have a selected item (i.e. the user previous expanded and selected a refiner)
        for (var i = 0; i < refiners.length; i++) {
    		if (refiners[i].IsSelected) {
    			Srch.Refinement.setExpanded(ctx.RefinementControl.propertyName, true);
    			break;
    		}
    	}
    
        
        
        ctx["DisplayTemplateData"]["BodyTemplateId"] = "~sitecollection/_catalogs/masterpage/Display Templates/Filters/Filter_MultiValue_Body_ML.js";
        ctx.RefinementControl["csr_propertyName"] = propertyName;
        ctx.RefinementControl["csr_displayTitle"] = displayTitle;
        ctx.RefinementControl["csr_filters"] = refiners;
        
        var mlb_PreviousRefiners = ctx.ClientControl["mlb_PreviousRefiners"] || {};
        mlb_PreviousRefiners[propertyName] = refiners; 
        ctx.ClientControl["mlb_PreviousRefiners"] = mlb_PreviousRefiners;
        
        ctx.RefinementControl["csr_isExpanded"] = isExpanded;
        ctx.RefinementControl["csr_renderEmptyContainer"] = renderEmptyContainer;
        ctx.RefinementControl["csr_useContains"] = useContains;
        ctx.RefinementControl["csr_useKQL"] = useKQL;
        ctx.RefinementControl["csr_showCounts"] = Options.ShowCounts;
    
    _#-->
            _#= ctx.RenderBody(ctx) =#_
    <!--#_
    	ctx.RefinementControl["mlb_initialLoadCompleted"] = true;
    }
    
    
    
    _#-->
        </div>
    </body>
    </html>
    

    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>Multi-value Refinement Item Body</title>
    
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:CompatibleManagedProperties msdt:dt="string"></mso:CompatibleManagedProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:CompatibleSearchDataTypes msdt:dt="string"></mso:CompatibleSearchDataTypes>
    <mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106604</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Refinement;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://edms.qa.jp.nissan.biz/_catalogs/masterpage/Display Templates/Filters/Filter_MultiValue_Body_ML.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:_dlc_DocId msdt:dt="string">TMZYZ7A64TV3-2036621469-579</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">e765f37c-a77b-40bf-97bc-a3a45abfcc72</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://edms.qa.jp.nissan.biz/_layouts/15/DocIdRedir.aspx?ID=TMZYZ7A64TV3-2036621469-579, TMZYZ7A64TV3-2036621469-579</mso:_dlc_DocIdUrl>
    <mso:DefaultCssFile msdt:dt="string"></mso:DefaultCssFile>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor msdt:dt="string">Mann, Steven</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Editor>
    <mso:DisplayTemplateJSTargetContentType msdt:dt="string"></mso:DisplayTemplateJSTargetContentType>
    <mso:Order msdt:dt="string">27400.0000000000</mso:Order>
    <mso:DisplayTemplateJSTargetScope msdt:dt="string"></mso:DisplayTemplateJSTargetScope>
    <mso:PublishingAssociatedVariations msdt:dt="string"></mso:PublishingAssociatedVariations>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:DisplayTemplateJSTargetControlType msdt:dt="string"></mso:DisplayTemplateJSTargetControlType>
    <mso:DisplayTemplateJSIconUrl msdt:dt="string"></mso:DisplayTemplateJSIconUrl>
    <mso:UIVersion msdt:dt="string"></mso:UIVersion>
    <mso:PublishingAssociatedContentType msdt:dt="string"></mso:PublishingAssociatedContentType>
    <mso:_SourceUrl msdt:dt="string"></mso:_SourceUrl>
    <mso:_SharedFileIndex msdt:dt="string"></mso:_SharedFileIndex>
    <mso:PublishingHidden msdt:dt="string">0</mso:PublishingHidden>
    <mso:DisplayTemplateJSTemplateHidden msdt:dt="string">0</mso:DisplayTemplateJSTemplateHidden>
    <mso:DisplayTemplateJSConfigurationUrl msdt:dt="string"></mso:DisplayTemplateJSConfigurationUrl>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:DisplayTemplateJSTemplateType msdt:dt="string"></mso:DisplayTemplateJSTemplateType>
    <mso:DisplayTemplateJSTargetListTemplate msdt:dt="string"></mso:DisplayTemplateJSTargetListTemplate>
    <mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author msdt:dt="string">Daffe, Amadou</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_Author>
    <mso:DisplayTemplateLevel msdt:dt="string"></mso:DisplayTemplateLevel>
    <mso:ManagedPropertyMapping msdt:dt="string"></mso:ManagedPropertyMapping>
    <mso:PublishingPreviewImage msdt:dt="string"></mso:PublishingPreviewImage>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties></xml><![endif]-->
    </head>
    <body>
    
    <script>
     $includeScript(this.url, "~Sitecollection/Style Library/EDMS/resource/EDMSAttributeResource.js");
    
    </script>
    
    <div id="Filter_MultiValue_Body">
    <!--#_
    
    var propertyName = ctx.RefinementControl["csr_propertyName"];
    var displayTitle = ctx.RefinementControl["csr_displayTitle"];
    var filters = ctx.RefinementControl["csr_filters"];
    var isExpanded = Srch.Refinement.getExpanded(ctx.RefinementControl.propertyName);
    var renderEmptyContainer = Boolean(ctx.RefinementControl["csr_renderEmptyContainer"]);
    var useContains = Boolean(ctx.RefinementControl["csr_useContains"]);
    var useKQL = Boolean(ctx.RefinementControl["csr_useKQL"]);
    var showCounts = Boolean(ctx.RefinementControl["csr_showCounts"]);
    
    if($isEmptyString(propertyName) || (!$isNull(renderEmptyContainer) && renderEmptyContainer))
    { 
    _#-->
            <div id="EmptyContainer"></div>
    <!--#_
    } 
    else if(!$isNull(filters) && Srch.U.isArray(filters) && !$isEmptyArray(filters))
    { 
        var expandedStatus = !$isNull(isExpanded) ? isExpanded : false;
        var iconClass = "ms-core-listMenu-item ";
        iconClass += ((expandedStatus == "true") ? "ms-ref-uparrow" : "ms-ref-downarrow");
       
      //  var iconClass = (isExpanded == "true"? "ms-ref-uparrow" : "ms-ref-downarrow");
       
    	var displayStyle = ((expandedStatus == "true") ? "" : "none");
    	
    
    _#-->
            <div id="Container" >
    		
    	
                _#= Srch.U.collapsibleRefinerTitle(propertyName, ctx.ClientControl.get_id(), displayTitle, iconClass) =#_
    			
    			
    			
    		    <div id='UnselectedSection' class='ms-ref-unselSec' style='display:_#= $htmlEncode(displayStyle) =#_'>
    		  
    		  
                   <div  id="unselShortList" class="ms-ref-unsel-shortList" > 
                
    
    					<!--#_ 
    					
    	
    					
    						//custom sorting to position Within Week One before Week Within week 2 
    							if (propertyName != null && propertyName.toLowerCase() == "apupdate"){
    							swapFilters(filters, 0, 1);
    							function swapFilters(array, indexA, indexB) {
    							  var tmp = array[indexB];
    							  array[indexB] = array[indexA];
    							  array[indexA] = tmp;
    							}
    							
    						}
    
    						//custom sorting to position Low after Medium for the Availability refinement
    						if (propertyName != null && propertyName.toLowerCase() == "aplevel"){
    						
    						
    							filters.sort(function(a,b){ 
    								//create a javascript object with property names corresponding to the values we want to ensure are sorted correctly,
    								//, and give the property names a numeric value corresponding to the ordering.
    								
    								var customSort = {high:1, medium:2, low:3};
    								var a1=a.RefinementName.toLowerCase(), b1= b.RefinementName.toLowerCase();
    								
    								//prepend the ordering if applicable (if not default to 999 so that these appear lower in the list)
    								a1 = (customSort[a1] || 999) + a1;
    								b1 = (customSort[b1] || 999) + b1;
    						
    								//standard checks for equality and lt/gt comparisons...
    							    if(a1== b1) return 0;
    							    return (a1 > b1) ? 1 : -1;
    							 });	
    						}
    						
    					    for (var i = 0; i < filters.length; i++){
    					        var filter = filters[i];
    					        if(!$isNull(filter)){
    					            var isSelected = Boolean(filter.IsSelected);
    					            var isDisabled = Boolean(filter.IsDisabled);
    					            var inputName = propertyName + '_ChkGroup';
    					            var inputId = inputName + "_" + filter.RefinementName;
    								var nameClass = "ms-ref-name ms-displayBlock " + (showCounts ? "ms-displayInline" : "ms-displayInlineBlock ms-ref-ellipsis");
    								//var nameClass = "ms-ref-name " + (showCounts ? "ms-displayInline" : "ms-ref-ellipsis");
    								var fontWeight = "normal";
    								var displayValue = "inherit";
    								
    								
    								var refinementName = filter.RefinementName;
    								
    								if (isDisabled) { 
    									displayValue = "none"; 
    								}
    
    								
    								
    								_#-->
    								
    								
    								
    								<div id="Value" name='Item'>
    									<span style="float:left">
    										<!--#_if(isSelected) {fontWeight = "bold";_#-->
    										<input type="checkbox" onclick=" $getClientControl(this).mlb_OnBeforeRefinementChecked('_#= $scriptEncode(propertyName) =#_', '_#= filter.RefinementName =#_', false); Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_); var e = jQuery.Event('custom'); $('body').trigger(e); setTimeout(function() {EDMS.util.wordRefineryReplace('#RefinementName',labeldatRegistration);EDMS.util.wordDomReplace('.askAttrTableContent')},1500);" class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_"  checked="" />
    									
    								<!--	<input type="checkbox" onclick="Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_);" class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_"  checked="" />-->
    										
    										
    										<!--#_}else {if (isDisabled) {fontWeight = "200";_#-->
    									    <input type="checkbox" visible="" disabled="disabled" onclick="Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_); "  class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_" />
    										
    										<!--#_}else {_#-->
    									    <input type="checkbox" onclick=" $getClientControl(this).mlb_OnBeforeRefinementChecked('_#= $scriptEncode(propertyName) =#_', '_#= filter.RefinementName =#_', true); Srch.Refinement.submitMultiRefinement('_#= $scriptEncode(propertyName) =#_', $getClientControl(this), _#= $htmlEncode(useContains) =#_, _#= $htmlEncode(useKQL) =#_); var e = jQuery.Event('custom'); $('body').trigger(e); " class="ms-padding0 ms-margin0 ms-verticalAlignMiddle" id="_#= $htmlEncode(inputId) =#_" name="_#= $htmlEncode(inputName) =#_" data-displayValue="_#= $htmlEncode(filter.RefinementName) =#_" value="_#= $htmlEncode(filter.RefinementToken) =#_" />
    									
    										<!--#_}}_#-->
    									</span>
    								
    										
    										<!--  <div id='RefinementName' class='_#= nameClass =#_'> _#= $htmlEncode(filter.RefinementName) =#_</div>-->
    										<div id='RefinementName' class='_#= nameClass =#_' title='_#= $htmlEncode(refinementName) =#_'> _#= $htmlEncode(refinementName) =#_</div>
    										
    										<!--#_if (showCounts) {_#-->
    										<!--<span style=" ; right:0; top:2px"><span id='RefinementCount' class='ms-ref-count ms-textSmall'> (_#= $htmlEncode(Srch.U.toFormattedNumber(filter.RefinementCount)) =#_) </span></span>-->
    									
    										<!--#_}_#-->
    									</div>
    									
    									
    
    							<!--#_
    							
    							        }
    									
    									
    							    }
    								
    							var stLang = Number(JSON.parse(localStorage.getItem(EDMS.common.LANGUAGE_KEY)));
    		
    
    			//console.log("stLang" +stLang);
    			 $(".ms-displayBlock").each(function(){
    			 
    			 $(this).mouseover(function(){
    			 
    			 //console.log("this");
    			
    			if(stLang == 1)
    			{
    			//console.log(stLang);
    			//$(this).attr('title','test');
    			$(this).attr('title', EDMS.util.wordHoverReplace('#Refinement',labeldatRegistration));
    		
    			}
    			
    		
    			});
    			});
    								
    							    
    							_#-->
    							
    							 
    
                        
                    </div>
             
    <!--#_
    }
    _#-->
        </div>
    </div>
    </div>
    </body>
    </html>
    

    I have created a new Filter Refinement Panel and it worked
    • Marked as answer by SP_2020 Tuesday, May 5, 2020 7:27 AM
    Tuesday, May 5, 2020 7:26 AM