...
SearchValue can be partial and should be minimum two characters in length after trimming.
SearchOption determines the column structure to use for filtering metadata (i.e for Service 60, we want to filter by "project name" or "nom du projet"). It can be spedified in English or French.
Code Block |
---|
//This is an exemple to search a service request by filtering metadata with partial search value. //It will filter metadata of service requests for service id 11. /*Note: - Service id 11 has metadata structure defined. - SearchValue and SearchOption are case insensitive - Both langauge is accepted for SearchOption - Always retrieve service request with metadata */ var serviceRequestSearchDTO = new ServiceRequestSearchDTO{ ServiceId "UserId": 0, "ServiceId": 11, "OrganizationId": 0, "ExcludeMetadata": false, "Page": 1, "PageSize": 25, "Filter": "PlaceOfSupply='ON'", "Version": 1 }= ServiceId, Page = 1, PageSize = 10, UserId = 3919, SearchValue "CONF", //using partial value SearchOption = "name" }; // Get ServiceRequestCollectionDTO including all service requests with metadata using partial value "CONF". // and the key name used to filter structure column is "NAME". All KeyName:name value: should contain "CONF" var serviceRequestCollectionDTO = await serviceRequestManager.SearchServiceRequest(serviceRequestSearchDTO ); |
Code Block |
---|
//This is an exemple to search a service request by filtering metadata with full search value.
//It will filter metadata of service requests for service id 11.
/*Note:
- Service id 11 has metadata structure defined.
- SearchValue and SearchOption are case insensitive
- Both langauge is accepted for SearchValue and SearchOption
- Always retrieve service request with metadata
*/
var serviceRequestSearchDTO = new ServiceRequestSearchDTO{
ServiceId = ServiceId,
Page = 1,
PageSize = 10,
UserId = 3919,
SearchValue "TC CONF ON Ottawa - 330 Sparks - 08 - 803 CONF TC", //using full value
SearchOption = "name"
};
// Get ServiceRequestCollectionDTO including all service requests with metadata using full value "TC CONF ON Ottawa - 330 Sparks - 08 - 803 CONF TC".
// and the key name used to filter structure column is "NAME". All KeyName:name value: should match "TC CONF ON Ottawa - 330 Sparks - 08 - 803 CONF TC"
var serviceRequestCollectionDTO = await serviceRequestManager.SearchServiceRequest(serviceRequestSearchDTO );
|