Help Center>Foundation Help

Applies to:

getSharePointItem

Returns the metadata of SharePoint ListItem(s) based on search parameters.

Argument

Description

SearchXML

XML based upon which search for the item is performed on SharePoint.

 

Return Value: An Xml Node containing the result. Result may contain multiple SharePoint items also.

Example Argument: The following example searches for employees present in the SharePoint list “ParkingTokenUsers” that live in same state where the first Employee present in the list “EmployeeList” with country “IN” lives.

<SVProcess>

<SearchInfo ListName="EmployeeList" FieldName="Country" Key="IN" ReturnType="EmployeeDetail" />

<ChainInfo ListName="ParkingTokenUsers" FieldName="HomeState" Key="State" ReturnType="EmployeeDetail" />

</SVProcess>

Argument description

SearchInfo: This is a mandatory node. It contains following attributes:

  • ListName: Name of the List where the item\items will be searched.
  • FieldName: Name of the Column in the SharePoint list.
  • Key: The value in the SharePoint column, based on which search will be carried out.
  • ReturnType: Name of the result node(s) in output xml of this function.

ChainInfo: This is an optional node used to make another search for a SharePoint item\items based on the first element returned by the search that corresponds to the "SearchInfo" node. If this node is used with the "SearchInfo" node, the final result will be the output of the search that corresponds to the "ChainInfo" node. This Xml node has following attributes:

  • ListName : Name of the List where item\items will be searched.
  • FieldName: Name of the Column in SharePoint list to be searched.
  • Key: Name of Column in the SharePoint list that corresponds to the search performed by the "SearchInfo" element. The value in this column is for the first list item returned by the search that corresponds to the "SearchInfo" node. It will be used to search items in the list that correspond to the "ChainInfo" node.
  • ReturnType: Name of the result node(s) in output xml of this function.

Example Return Value

< EmployeeDetails xmlns="">

< EmployeeDetail ><ItemId>1</ItemId><Modified>2014-06-10T13:09:41</Modified><LoginName>yourdomain\user1</LoginName><HomeCountry /><HomeState>PB</HomeState></ EmployeeDetail >

< EmployeeDetail ><ItemId>3</ItemId><Modified>2014-06-10T13:10:14</Modified>><LoginName> yourdomain\user2</LoginName><HomeCountry /><HomeState>PB</HomeState></ EmployeeDetail >

<EmployeeDetail ><ItemId>4</ItemId><Modified>2014-06-10T13:09:59</Modified>><LoginName> yourdomain\user3</LoginName><HomeCountry /><HomeState>PB</HomeState></ EmployeeDetail >

</ EmployeeDetails>