RangerMSP Select Query

RangerMSP API Integration in the Jupiter Server uses a Select object to retrieve data from the RangerMSP database. The Select object comprises of one or more criteria objects. A criteria object contains a FieldName, a Operator and a Value.

The FieldNames are the Property names that can be found in the RangerMSP API documentation for C# at this website http://www.rangermsp.com/wiki/CSharp_API

The list of valid operators for a criteria object are

  • opEqual
  • opGreaterThan
  • opGreaterThanOrEqual
  • opLessThan
  • opLessThanOrEqual
  • opLike
  • opNot
  • opNotLike

Below are examples of a Select object in C# and Powershell

C# example of Select Object used to retrieve all Accounts beginning with Co that are in the city of Sydney
RangerMSPService.Select select = new RangerMSPService.Select
{
	Link = "and",
	RecordLimit = 10,
	Criterias = new RangerMSPService.Criteria[2]
	{
		new RangerMSPService.Criteria
		{
			Field = "CompanyName",
			Operation = "opLike",
			Value = "Co%"
		},
		new RangerMSPService.Criteria
		{
			Field = "City",
			Operation = "opEqual",
			Value = "Sydney"
		}
	}
};
Powershell example of a Select Object used to retrieve all Accounts beginning with Co that are in the city of Sydney
<Select>
	<Select xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
		<Criterias>
			<Criteria>
				<Field>CompanyName</Field>
				<Operation>opLike</Operation>
				<Value>Co%</Value>
			</Criteria>
			<Criteria>
				<Field>City</Field>
				<Operation>opEqual</Operation>
				<Value>Sydney</Value>
			</Criteria>
		</Criterias>
		<RecordLimit>10</RecordLimit>
		<Link>and</Link>
	</Select>
</Select>