SharePoint People Data Provider

SharePoint People Data Provider

General Info

This Data Provider is used to fetch Person or Group records from a SharePoint site. The result value is an array of objects of type pf.sp.IPrincipal. 
The properties used to configure this provider are the following:
  1. Url: The url of the SharePoint site where the list/document library belongs. Leave blank in order to use the current one.
  2. Include Groups: Enable this option in order to fetch also SharePoint groups apart from Users.
  3. Selected Groups: The group ID from which to retrieve the users. Use zero (0) in order to fetch users from all groups. 
  4. Name Filter: The default filter for querying users and groups. SharePoint by default searches by Name in both groups and users. 
formula can be used for Name Filter, in order to specify a dynamic value that is going to be resolved during runtime. In order to do that, make sure you precede the value with an equals sign (=). For example, you can use the following expression if the Name of the user to find depends on a value of another textbox control in your form:
=form.GetControl("txt_UserName").GetValue()
or alternatively
={txt_UserName}

Return Values 

An array of javascript objects is returned. These objects implement the IPrincipal Openous interface, with the following properties:
  1. ID: a unique identifier of the person or group record, usually matches the SharePoint ID.
  2. Title: the Title (Display Name) of the person or group record
  3. PrincipalId: the ID returned from SharePoint for this person or group record. In case of user records that have not yet been registered to this SharePoint site, -1 is used.
  4. Email
  5. LoginName
  6. Department
  7. Type: SharePoint Principal Type enumeration (number)
  8. TypeName: The Display value of the principal type, in order to identify the type of the record ("SharePointUser", "WindowsUser", "SharePointGroup", "SecurityGroup", "DistributionList")


See Also

For more info about the concept of Data Providers, their usage and their common properties (Name, OnDataLoaded, Condition, etc) see Basic Concepts: Intro to Data Providers