在显示模板中显示传真属性 [英] Show Fax Property in display template

查看:49
本文介绍了在显示模板中显示传真属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Sharepointers,

我正在尝试在SharePoint在线搜索中心的自定义显示模板中显示传真属性,但是它不起作用,我也不知道我在做什么错.

我基于Item Person创建了一个自定义显示模板,我想在其中显示一些用户属性,尤其是传真号码.

正确设置了传真属性,我可以在用户配置文件管理页面中看到值.

这就是我要做的:

-我创建了一个名为"FaxNumber"的托管属性,映射到"People:Fax"

-在自定义项目人显示模板的ManagedPropertyMapping部分中,添加托管属性

< mso:ManagedPropertyMapping msdt:dt ='"string"> ....,'FaxNumber':'FaxNumber',.........</mso: ManagedPropertyMapping> 

并尝试像这样使用它

 

< --– p

...

var Fax = ctx.CurrentItem.FaxNumber; _#-> < b>传真:</b> _#=传真=#_< br/>

-我将Perople Result Search Web部件设置为使用我的自定义显示模板

-我搜索设置了传真属性的用户,但是结果页面显示传真:,没有值

-显示其他属性

我想我缺少了一些东西,但我不知道什么.

谢谢

Fabio

解决方案

嗨法比奥,

在大多数情况下,已抓取的属性已映射到SSA上的mp并且看不到数据,那么托管属性要么无法检索,要么您映射了错误的被抓取的属性 属性.

重要的是映射名称为ows_internalname的已爬网属性,其中internalname是SharePoint列表中字段的内部名称或实际名称,而不是显示名称.

添加代码以显示模板后,请访问网站设置>结果类型,显示属性同步"警报>点击更新

请参阅下面的文章,该文章适用于SharePoint Online:

http://blogs.perficient.com/delivery/blog/2016/02/29/sharepoint-2013-search-missing-managed-property-value/

最佳预告片,

Lisa Chen 


Hello Sharepointers,

I'm trying to display the fax property in a custom display template on a Sharepoint Online Search Center, but it doesn't work and I don't know what I'm doing wrong.

I created a custom display template based on Item Person in which I want to show some user properties, in particular the fax number.

The Fax property is correctly set and I can see values in the user profile administration pages.

This is what I do:

- I create a Managed Property named "FaxNumber" which is mapped to "People:Fax"

- In my custom Item Person Display Template, in the ManagedPropertyMapping section, I add the managed property

<mso:ManagedPropertyMapping msdt:dt="string">....,'FaxNumber':'FaxNumber',.........</mso:ManagedPropertyMapping>

and try to use it like this

<--

...

var fax = ctx.CurrentItem.FaxNumber; _#--> <b>Fax:</b> _#= fax =#_ <br/>

- I set the Perople Result Search Web Part to use my custom display template

- I search for a user who has the fax property set, but the result page shows Fax: with no value

- Other properties are displayed

I think I'm missing something but I don't know what.

Thank you

Fabio

解决方案

Hi Fabio, 

In most cases where the crawled property has been mapped to an mp on the SSA and you don's see data, then the managed property is either not retrievable or you have mapped the wrong crawled  property.

It's important to map the crawled property which has the name ows_internalname, where internalname is the internal or actual name of the field in the SharePoint list, not the display name.

After you add code to display template, please access Site settings > Result Types, a Property Sync alert is displayed > click Update

Refer to the following article which is work in SharePoint online:

http://blogs.perficient.com/delivery/blog/2016/02/29/sharepoint-2013-search-missing-managed-property-value/

Best Reagrds, 

Lisa Chen 


这篇关于在显示模板中显示传真属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆