Contact Selector Control
来源:互联网 发布:java spring rpc客户端 编辑:程序博客网 时间:2024/05/02 16:24
We have seen a number of requests on how to allow a user to enter (or select) a person’s name or logon alias and then validate that user against their Active Directory without using code. This has been especially true in workflow scenarios where User A needs to enter in the name of User B – the next person in the workflow process.
Well, InfoPath 2007 ships with a control called Contact Selector Control that will resolve these issues! You may have seen our older article on the subject; this one aims to dive in deeper.
The Contact Selector control is an ActiveX control but it is a special cased control, in that it can also be used in InfoPath browser forms. To use this control there are specific steps that need to be taken – let’s take a look at those now.
Step 1: Add the Contact Selector control to your Controls Task Pane
1) From the Controls Task Pane click the Add or Remove Custom Controls link
2) Click the Add button
3) On the first screen of the Add Custom Control Wizard select ActiveX control and click Next
4) From the list of controls, choose Contact Selector and click Next
5) Select “Don’t include a .cab file” and click Next
6) For Binding Property select Value and click Next
7) From the Field or group type box choose Field or group (any data type) and click Finish
8) Click Close and then click OK
Step 2: Create the data structure for the Contact Selector Control
The Contact Selector control needs to have a specific data structure to work properly – this is documented on the “Items” tab of the Properties screen for the control; however, we’ll include that information here as well.
**IMPORTANT!** Spelling and capitalization must be exactly the same, starting with the “Person” group!
1) Add a non-Repeating Group named: gpContactSelector
2) Add a Repeating Group named: Person
3) Add the following 3 text fields to the Person group: DisplayName, AccountId and AccountType
Step 3: Add and bind the Contact Selector control to the View
1) Drag the gpContactSelector Group to the View and select “Contact Selector” from the list of controls
2) You’re almost done…! :-)
Step 4: Add a secondary data source XML file which specifies the SharePoint server
The Contact Selector control needs to know the “context” of where the user validation should occur. These steps are not necessary if you are only displaying the form in a browser from SharePoint – in this case, it uses the context of the site from where it was provisioned; however, if you are in a mixed client/browser scenario you will need to include this XML file so forms opened in the client can use this functionality.
1) Launch Notepad
2) Copy and paste this one-line XML:
<Context siteUrl="http://<servername>"/>
**NOTE: Replace <servername> with the name of your server
3) Save this as: Context.xml (again – naming and capitalization are important)
4) Add Context.xml as a “Receive” type Secondary Data Connection to your form template and make sure the option “Include the data as a resource file” is enabled
- Contact Selector Control
- Using the Contact Selector Control
- Contact Selector in InfoPath 2007 and 2010
- 转:InfoPath 中,如何验证 Contact Selector 控件是否输入了有效值,或如何强制输入? Validate the Contact Selector in InfoPath – Make the Contact Selector Man
- contact
- Contact
- Contact
- contact
- Contact
- Contact
- contact
- 转:InfoPath 中,如何限制 Contact Selector 控件中输入的用户数量? Validate the Contact Selector in InfoPath – Limit the number of names a user can
- Activex test contact failed to create control 未指定的错误 控件无法加载的原因
- Activex test contact failed to create control 未指定的错误 控件无法加载的原因
- USACO 3.1 Contact (contact)
- USACO3.1.4 Contact (contact)
- USACO3.1.4 Contact (contact)
- selector
- 如何用js显示二进制图片
- TextBox不允许为空
- 批处理文件BAT命令大全
- C#如何在程序里定时启动任务
- JS中读取判断下拉框
- Contact Selector Control
- 第1章 简介
- 控件尺寸跟随窗口尺寸改变
- 关于 StyleManager.loadStyleDeclarations的错误。StyleManagerImpl.as:858
- reSIProcate添加对自定义头字段的支持
- 无限递归产品分类
- 类似google的结果提示框 和 ToolTips 控件
- 中断(break/continue)PHP程序执行
- 谁将会成为马云的第九个孩子?