autoit / Creatio API / $filter parameter with startswith function
Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oQueryParams = ObjCreate("Chilkat.JsonObject")
$oQueryParams.UpdateString("$filter","startswith(Field2,'Field2Value')")
$oHttp.SetRequestHeader "ForceUseSession","true"
$oHttp.SetRequestHeader "BPMCSRF","{{BPMCSRF}}"
Local $oResp = $oHttp.QuickRequestParams("GET","https://myserver.com/0/ServiceModel/EntityDataService.svc/Collection1Collection",$oQueryParams)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
$oSbResponseBody = ObjCreate("Chilkat.StringBuilder")
$oResp.GetBodySb($oSbResponseBody)
$oXmlResponse = ObjCreate("Chilkat.Xml")
$oXmlResponse.LoadSb($oSbResponseBody,True)
ConsoleWrite($oXmlResponse.GetXml() & @CRLF)
; Sample XML response:
; (Sample code for parsing the XML response is shown below)
; <?xml version="1.0" encoding="utf-8"?>
; <feed xml:base="https://myserver.com/0/ServiceModel/EntityDataService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
; <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection</id>
; <title type="text">EmployeeCollection</title>
; <updated>2020-04-09T11:25:13Z</updated>
; <link rel="self" title="EmployeeCollection" href="EmployeeCollection"/>
; <entry>
; <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')</id>
; <category term="Terrasoft.Configuration.Employee" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
; <link rel="edit" title="Employee" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CreatedBy" type="application/atom+xml;type=entry" title="CreatedBy" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/CreatedBy"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy" type="application/atom+xml;type=entry" title="ModifiedBy" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/ModifiedBy"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Contact" type="application/atom+xml;type=entry" title="Contact" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Contact"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnitCollectionByHead" type="application/atom+xml;type=feed" title="OrgStructureUnitCollectionByHead" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/OrgStructureUnitCollectionByHead"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnit" type="application/atom+xml;type=entry" title="OrgStructureUnit" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/OrgStructureUnit"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Job" type="application/atom+xml;type=entry" title="Job" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Job"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Owner" type="application/atom+xml;type=entry" title="Owner" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Owner"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ReasonForDismissal" type="application/atom+xml;type=entry" title="ReasonForDismissal" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/ReasonForDismissal"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Account" type="application/atom+xml;type=entry" title="Account" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Account"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager" type="application/atom+xml;type=entry" title="Manager" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Manager"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCollectionByManager" type="application/atom+xml;type=feed" title="EmployeeCollectionByManager" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeCollectionByManager"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCareerCollectionByEmployee" type="application/atom+xml;type=feed" title="EmployeeCareerCollectionByEmployee" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeCareerCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeFileCollectionByEmployee" type="application/atom+xml;type=feed" title="EmployeeFileCollectionByEmployee" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeFileCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInFolderCollectionByEmployee" type="application/atom+xml;type=feed" title="EmployeeInFolderCollectionByEmployee" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeInFolderCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInTagCollectionByEntity" type="application/atom+xml;type=feed" title="EmployeeInTagCollectionByEntity" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeInTagCollectionByEntity"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/SalaryCollectionByEmployee" type="application/atom+xml;type=feed" title="SalaryCollectionByEmployee" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/SalaryCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/VwEmployeesHierarchyCollectionByEmployee" type="application/atom+xml;type=feed" title="VwEmployeesHierarchyCollectionByEmployee" href="EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/VwEmployeesHierarchyCollectionByEmployee"/>
; <title/>
; <updated>2020-04-09T11:25:13Z</updated>
; <author>
; <name/>
; </author>
; <content type="application/xml">
; <m:properties>
; <d:Id m:type="Edm.Guid">9842387d-069f-466c-9551-32cedbc16d90</d:Id>
; <d:Name>Mary King</d:Name>
; <d:CreatedOn m:type="Edm.DateTime">2017-03-30T14:50:30Z</d:CreatedOn>
; <d:CreatedById m:type="Edm.Guid">76929f8c-7e15-4c64-bdb0-adc62d383727</d:CreatedById>
; <d:ModifiedOn m:type="Edm.DateTime">2017-03-31T07:27:18Z</d:ModifiedOn>
; <d:ModifiedById m:type="Edm.Guid">76929f8c-7e15-4c64-bdb0-adc62d383727</d:ModifiedById>
; <d:ProcessListeners m:type="Edm.Int32">0</d:ProcessListeners>
; <d:ContactId m:type="Edm.Guid">cad50d15-f28d-49fc-aa79-21615ac35b86</d:ContactId>
; <d:OrgStructureUnitId m:type="Edm.Guid">43172897-fbd6-4bc1-b81b-55964ab558e6</d:OrgStructureUnitId>
; <d:Notes/>
; <d:JobId m:type="Edm.Guid">955472f0-56e6-df11-971b-001d60e938c6</d:JobId>
; <d:FullJobTitle>Customer manager</d:FullJobTitle>
; <d:OwnerId m:type="Edm.Guid">76929f8c-7e15-4c64-bdb0-adc62d383727</d:OwnerId>
; <d:CareerStartDate m:type="Edm.DateTime">2019-04-07T00:00:00</d:CareerStartDate>
; <d:CareerDueDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CareerDueDate>
; <d:ProbationDueDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:ProbationDueDate>
; <d:ReasonForDismissalId m:type="Edm.Guid">00000000-0000-0000-0000-000000000000</d:ReasonForDismissalId>
; <d:AccountId m:type="Edm.Guid">e308b781-3c5b-4ecb-89ef-5c1ed4da488e</d:AccountId>
; <d:ManagerId m:type="Edm.Guid">e17c9cd6-262d-481d-86a9-f09a82984e0e</d:ManagerId>
; </m:properties>
; </content>
; </entry>
; <entry>
; <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')</id>
; <category term="Terrasoft.Configuration.Employee" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
; <link rel="edit" title="Employee" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CreatedBy" type="application/atom+xml;type=entry" title="CreatedBy" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/CreatedBy"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy" type="application/atom+xml;type=entry" title="ModifiedBy" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/ModifiedBy"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Contact" type="application/atom+xml;type=entry" title="Contact" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Contact"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnitCollectionByHead" type="application/atom+xml;type=feed" title="OrgStructureUnitCollectionByHead" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/OrgStructureUnitCollectionByHead"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnit" type="application/atom+xml;type=entry" title="OrgStructureUnit" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/OrgStructureUnit"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Job" type="application/atom+xml;type=entry" title="Job" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Job"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Owner" type="application/atom+xml;type=entry" title="Owner" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Owner"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ReasonForDismissal" type="application/atom+xml;type=entry" title="ReasonForDismissal" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/ReasonForDismissal"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Account" type="application/atom+xml;type=entry" title="Account" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Account"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager" type="application/atom+xml;type=entry" title="Manager" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Manager"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCollectionByManager" type="application/atom+xml;type=feed" title="EmployeeCollectionByManager" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeCollectionByManager"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCareerCollectionByEmployee" type="application/atom+xml;type=feed" title="EmployeeCareerCollectionByEmployee" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeCareerCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeFileCollectionByEmployee" type="application/atom+xml;type=feed" title="EmployeeFileCollectionByEmployee" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeFileCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInFolderCollectionByEmployee" type="application/atom+xml;type=feed" title="EmployeeInFolderCollectionByEmployee" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeInFolderCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInTagCollectionByEntity" type="application/atom+xml;type=feed" title="EmployeeInTagCollectionByEntity" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeInTagCollectionByEntity"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/SalaryCollectionByEmployee" type="application/atom+xml;type=feed" title="SalaryCollectionByEmployee" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/SalaryCollectionByEmployee"/>
; <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/VwEmployeesHierarchyCollectionByEmployee" type="application/atom+xml;type=feed" title="VwEmployeesHierarchyCollectionByEmployee" href="EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/VwEmployeesHierarchyCollectionByEmployee"/>
; <title/>
; <updated>2020-04-09T11:25:13Z</updated>
; <author>
; <name/>
; </author>
; <content type="application/xml">
; <m:properties>
; <d:Id m:type="Edm.Guid">3b952b60-2502-4ab2-a967-7f898f8b8b55</d:Id>
; <d:Name>Megan Lewis</d:Name>
; <d:CreatedOn m:type="Edm.DateTime">2017-03-30T14:51:27Z</d:CreatedOn>
; <d:CreatedById m:type="Edm.Guid">76929f8c-7e15-4c64-bdb0-adc62d383727</d:CreatedById>
; <d:ModifiedOn m:type="Edm.DateTime">2017-03-31T07:30:20Z</d:ModifiedOn>
; <d:ModifiedById m:type="Edm.Guid">76929f8c-7e15-4c64-bdb0-adc62d383727</d:ModifiedById>
; <d:ProcessListeners m:type="Edm.Int32">0</d:ProcessListeners>
; <d:ContactId m:type="Edm.Guid">27bbc601-2d48-4652-8d18-eb93e718a78c</d:ContactId>
; <d:OrgStructureUnitId m:type="Edm.Guid">43172897-fbd6-4bc1-b81b-55964ab558e6</d:OrgStructureUnitId>
; <d:Notes/>
; <d:JobId m:type="Edm.Guid">955472f0-56e6-df11-971b-001d60e938c6</d:JobId>
; <d:FullJobTitle>Customer manager</d:FullJobTitle>
; <d:OwnerId m:type="Edm.Guid">76929f8c-7e15-4c64-bdb0-adc62d383727</d:OwnerId>
; <d:CareerStartDate m:type="Edm.DateTime">2019-11-10T00:00:00</d:CareerStartDate>
; <d:CareerDueDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CareerDueDate>
; <d:ProbationDueDate m:type="Edm.DateTime">2020-02-10T00:00:00</d:ProbationDueDate>
; <d:ReasonForDismissalId m:type="Edm.Guid">00000000-0000-0000-0000-000000000000</d:ReasonForDismissalId>
; <d:AccountId m:type="Edm.Guid">e308b781-3c5b-4ecb-89ef-5c1ed4da488e</d:AccountId>
; <d:ManagerId m:type="Edm.Guid">e17c9cd6-262d-481d-86a9-f09a82984e0e</d:ManagerId>
; </m:properties>
; </content>
; </entry>
; </feed>
; Sample code for parsing the XML response...
; Use this online tool to generate parsing code from sample XML: Generate XML Parsing Code
Local $sCategory_term
Local $sCategory_scheme
Local $iJ
Local $iCount_j
Local $sLink_type
Local $sContent_type
Local $sD_Id_m_type
Local $sD_Id
Local $sD_Name
Local $sD_CreatedOn_m_type
Local $sD_CreatedOn
Local $sD_CreatedById_m_type
Local $sD_CreatedById
Local $sD_ModifiedOn_m_type
Local $sD_ModifiedOn
Local $sD_ModifiedById_m_type
Local $sD_ModifiedById
Local $sD_ProcessListeners_m_type
Local $iD_ProcessListeners
Local $sD_ContactId_m_type
Local $sD_ContactId
Local $sD_OrgStructureUnitId_m_type
Local $sD_OrgStructureUnitId
Local $sD_JobId_m_type
Local $sD_JobId
Local $sD_FullJobTitle
Local $sD_OwnerId_m_type
Local $sD_OwnerId
Local $sD_CareerStartDate_m_type
Local $sD_CareerStartDate
Local $sD_CareerDueDate_m_type
Local $sD_CareerDueDate
Local $sD_ProbationDueDate_m_type
Local $sD_ProbationDueDate
Local $sD_ReasonForDismissalId_m_type
Local $sD_ReasonForDismissalId
Local $sD_AccountId_m_type
Local $sD_AccountId
Local $sD_ManagerId_m_type
Local $sD_ManagerId
Local $sFeed_xml_base = $oXmlResponse.GetAttrValue("xml:base")
Local $sFeed_xmlns = $oXmlResponse.GetAttrValue("xmlns")
Local $sFeed_xmlns_d = $oXmlResponse.GetAttrValue("xmlns:d")
Local $sFeed_xmlns_m = $oXmlResponse.GetAttrValue("xmlns:m")
Local $sId = $oXmlResponse.GetChildContent("id")
Local $sTitle_type = $oXmlResponse.ChilkatPath("title|(type)")
Local $sTitle = $oXmlResponse.GetChildContent("title")
Local $sUpdated = $oXmlResponse.GetChildContent("updated")
Local $sLink_rel = $oXmlResponse.ChilkatPath("link|(rel)")
Local $sLink_title = $oXmlResponse.ChilkatPath("link|(title)")
Local $sLink_href = $oXmlResponse.ChilkatPath("link|(href)")
Local $i = 0
Local $iCount_i = $oXmlResponse.NumChildrenHavingTag("entry")
While $i < $iCount_i
$oXmlResponse.I = $i
$sId = $oXmlResponse.GetChildContent("entry[i]|id")
$sCategory_term = $oXmlResponse.ChilkatPath("entry[i]|category|(term)")
$sCategory_scheme = $oXmlResponse.ChilkatPath("entry[i]|category|(scheme)")
$iJ = 0
$iCount_j = $oXmlResponse.NumChildrenHavingTag("entry[i]|link")
While $iJ < $iCount_j
$oXmlResponse.J = $iJ
$sLink_rel = $oXmlResponse.ChilkatPath("entry[i]|link[j]|(rel)")
$sLink_title = $oXmlResponse.ChilkatPath("entry[i]|link[j]|(title)")
$sLink_href = $oXmlResponse.ChilkatPath("entry[i]|link[j]|(href)")
$sLink_type = $oXmlResponse.ChilkatPath("entry[i]|link[j]|(type)")
$iJ = $iJ + 1
Wend
$sUpdated = $oXmlResponse.GetChildContent("entry[i]|updated")
$sContent_type = $oXmlResponse.ChilkatPath("entry[i]|content|(type)")
$sD_Id_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:Id|(m:type)")
$sD_Id = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:Id")
$sD_Name = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:Name")
$sD_CreatedOn_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:CreatedOn|(m:type)")
$sD_CreatedOn = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:CreatedOn")
$sD_CreatedById_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:CreatedById|(m:type)")
$sD_CreatedById = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:CreatedById")
$sD_ModifiedOn_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ModifiedOn|(m:type)")
$sD_ModifiedOn = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:ModifiedOn")
$sD_ModifiedById_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ModifiedById|(m:type)")
$sD_ModifiedById = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:ModifiedById")
$sD_ProcessListeners_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ProcessListeners|(m:type)")
$iD_ProcessListeners = $oXmlResponse.GetChildIntValue("entry[i]|content|m:properties|d:ProcessListeners")
$sD_ContactId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ContactId|(m:type)")
$sD_ContactId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:ContactId")
$sD_OrgStructureUnitId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:OrgStructureUnitId|(m:type)")
$sD_OrgStructureUnitId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:OrgStructureUnitId")
$sD_JobId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:JobId|(m:type)")
$sD_JobId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:JobId")
$sD_FullJobTitle = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:FullJobTitle")
$sD_OwnerId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:OwnerId|(m:type)")
$sD_OwnerId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:OwnerId")
$sD_CareerStartDate_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:CareerStartDate|(m:type)")
$sD_CareerStartDate = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:CareerStartDate")
$sD_CareerDueDate_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:CareerDueDate|(m:type)")
$sD_CareerDueDate = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:CareerDueDate")
$sD_ProbationDueDate_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ProbationDueDate|(m:type)")
$sD_ProbationDueDate = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:ProbationDueDate")
$sD_ReasonForDismissalId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ReasonForDismissalId|(m:type)")
$sD_ReasonForDismissalId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:ReasonForDismissalId")
$sD_AccountId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:AccountId|(m:type)")
$sD_AccountId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:AccountId")
$sD_ManagerId_m_type = $oXmlResponse.ChilkatPath("entry[i]|content|m:properties|d:ManagerId|(m:type)")
$sD_ManagerId = $oXmlResponse.GetChildContent("entry[i]|content|m:properties|d:ManagerId")
$i = $i + 1
Wend
Curl Command
curl -G -d "$filter=startswith%28Field2,%27Field2Value%27%29"
-H "ForceUseSession: true"
-H "BPMCSRF: {{BPMCSRF}}"
https://myserver.com/0/ServiceModel/EntityDataService.svc/Collection1Collection
Postman Collection Item JSON
{
"name": "$filter parameter with startswith function",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "ForceUseSession",
"type": "text",
"value": "true"
},
{
"key": "BPMCSRF",
"type": "text",
"value": "{{BPMCSRF}}"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{BaseURI}}/0/ServiceModel/EntityDataService.svc/{{CollectionName1}}Collection?$filter=startswith({{FieldName2}},'{{FieldName2Value2}}')",
"host": [
"{{BaseURI}}"
],
"path": [
"0",
"ServiceModel",
"EntityDataService.svc",
"{{CollectionName1}}Collection"
],
"query": [
{
"key": "$filter",
"value": "startswith({{FieldName2}},'{{FieldName2Value2}}')"
}
]
},
"description": "Request for getting filtered object collection instances via the [$filter](https://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/#thefiltersystemqueryoption) parameter with the startswith function."
},
"response": [
{
"name": "[200] Gets filtered object collection instances. The filter uses the “startswith” function",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "ForceUseSession",
"type": "text",
"value": "true"
},
{
"key": "BPMCSRF",
"type": "text",
"value": "{{BPMCSRF}}"
}
],
"url": {
"raw": "https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection?$filter=startswith(FullJobTitle,'Custom')",
"protocol": "https",
"host": [
"myserver",
"com"
],
"path": [
"0",
"ServiceModel",
"EntityDataService.svc",
"EmployeeCollection"
],
"query": [
{
"key": "$filter",
"value": "startswith(FullJobTitle,'Custom')"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "xml",
"header": [
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Content-Type",
"value": "application/atom+xml;type=feed;charset=utf-8"
},
{
"key": "Server",
"value": "Microsoft-IIS/10.0"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "DataServiceVersion",
"value": "2.0;"
},
{
"key": "X-AspNet-Version",
"value": "4.0.30319"
},
{
"key": "X-Powered-By",
"value": "ASP.NET"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Date",
"value": "Thu, 09 Apr 2020 11:25:13 GMT"
},
{
"key": "Content-Length",
"value": "12987"
}
],
"cookie": [
],
"body": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<feed xml:base=\"https://myserver.com/0/ServiceModel/EntityDataService.svc/\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection</id>\n <title type=\"text\">EmployeeCollection</title>\n <updated>2020-04-09T11:25:13Z</updated>\n <link rel=\"self\" title=\"EmployeeCollection\" href=\"EmployeeCollection\" />\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/CreatedBy\" type=\"application/atom+xml;type=entry\" title=\"CreatedBy\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/CreatedBy\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy\" type=\"application/atom+xml;type=entry\" title=\"ModifiedBy\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/ModifiedBy\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Contact\" type=\"application/atom+xml;type=entry\" title=\"Contact\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Contact\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnitCollectionByHead\" type=\"application/atom+xml;type=feed\" title=\"OrgStructureUnitCollectionByHead\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/OrgStructureUnitCollectionByHead\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnit\" type=\"application/atom+xml;type=entry\" title=\"OrgStructureUnit\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/OrgStructureUnit\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Job\" type=\"application/atom+xml;type=entry\" title=\"Job\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Job\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Owner\" type=\"application/atom+xml;type=entry\" title=\"Owner\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Owner\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ReasonForDismissal\" type=\"application/atom+xml;type=entry\" title=\"ReasonForDismissal\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/ReasonForDismissal\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Account\" type=\"application/atom+xml;type=entry\" title=\"Account\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Account\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager\" type=\"application/atom+xml;type=entry\" title=\"Manager\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/Manager\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCollectionByManager\" type=\"application/atom+xml;type=feed\" title=\"EmployeeCollectionByManager\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeCollectionByManager\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCareerCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"EmployeeCareerCollectionByEmployee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeCareerCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeFileCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"EmployeeFileCollectionByEmployee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeFileCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInFolderCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"EmployeeInFolderCollectionByEmployee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeInFolderCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInTagCollectionByEntity\" type=\"application/atom+xml;type=feed\" title=\"EmployeeInTagCollectionByEntity\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/EmployeeInTagCollectionByEntity\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/SalaryCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"SalaryCollectionByEmployee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/SalaryCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/VwEmployeesHierarchyCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"VwEmployeesHierarchyCollectionByEmployee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')/VwEmployeesHierarchyCollectionByEmployee\" />\n <title />\n <updated>2020-04-09T11:25:13Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Id m:type=\"Edm.Guid\">9842387d-069f-466c-9551-32cedbc16d90</d:Id>\n <d:Name>Mary King</d:Name>\n <d:CreatedOn m:type=\"Edm.DateTime\">2017-03-30T14:50:30Z</d:CreatedOn>\n <d:CreatedById m:type=\"Edm.Guid\">76929f8c-7e15-4c64-bdb0-adc62d383727</d:CreatedById>\n <d:ModifiedOn m:type=\"Edm.DateTime\">2017-03-31T07:27:18Z</d:ModifiedOn>\n <d:ModifiedById m:type=\"Edm.Guid\">76929f8c-7e15-4c64-bdb0-adc62d383727</d:ModifiedById>\n <d:ProcessListeners m:type=\"Edm.Int32\">0</d:ProcessListeners>\n <d:ContactId m:type=\"Edm.Guid\">cad50d15-f28d-49fc-aa79-21615ac35b86</d:ContactId>\n <d:OrgStructureUnitId m:type=\"Edm.Guid\">43172897-fbd6-4bc1-b81b-55964ab558e6</d:OrgStructureUnitId>\n <d:Notes></d:Notes>\n <d:JobId m:type=\"Edm.Guid\">955472f0-56e6-df11-971b-001d60e938c6</d:JobId>\n <d:FullJobTitle>Customer manager</d:FullJobTitle>\n <d:OwnerId m:type=\"Edm.Guid\">76929f8c-7e15-4c64-bdb0-adc62d383727</d:OwnerId>\n <d:CareerStartDate m:type=\"Edm.DateTime\">2019-04-07T00:00:00</d:CareerStartDate>\n <d:CareerDueDate m:type=\"Edm.DateTime\">0001-01-01T00:00:00</d:CareerDueDate>\n <d:ProbationDueDate m:type=\"Edm.DateTime\">0001-01-01T00:00:00</d:ProbationDueDate>\n <d:ReasonForDismissalId m:type=\"Edm.Guid\">00000000-0000-0000-0000-000000000000</d:ReasonForDismissalId>\n <d:AccountId m:type=\"Edm.Guid\">e308b781-3c5b-4ecb-89ef-5c1ed4da488e</d:AccountId>\n <d:ManagerId m:type=\"Edm.Guid\">e17c9cd6-262d-481d-86a9-f09a82984e0e</d:ManagerId>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/CreatedBy\" type=\"application/atom+xml;type=entry\" title=\"CreatedBy\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/CreatedBy\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy\" type=\"application/atom+xml;type=entry\" title=\"ModifiedBy\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/ModifiedBy\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Contact\" type=\"application/atom+xml;type=entry\" title=\"Contact\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Contact\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnitCollectionByHead\" type=\"application/atom+xml;type=feed\" title=\"OrgStructureUnitCollectionByHead\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/OrgStructureUnitCollectionByHead\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/OrgStructureUnit\" type=\"application/atom+xml;type=entry\" title=\"OrgStructureUnit\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/OrgStructureUnit\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Job\" type=\"application/atom+xml;type=entry\" title=\"Job\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Job\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Owner\" type=\"application/atom+xml;type=entry\" title=\"Owner\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Owner\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ReasonForDismissal\" type=\"application/atom+xml;type=entry\" title=\"ReasonForDismissal\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/ReasonForDismissal\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Account\" type=\"application/atom+xml;type=entry\" title=\"Account\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Account\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Manager\" type=\"application/atom+xml;type=entry\" title=\"Manager\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/Manager\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCollectionByManager\" type=\"application/atom+xml;type=feed\" title=\"EmployeeCollectionByManager\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeCollectionByManager\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeCareerCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"EmployeeCareerCollectionByEmployee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeCareerCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeFileCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"EmployeeFileCollectionByEmployee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeFileCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInFolderCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"EmployeeInFolderCollectionByEmployee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeInFolderCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/EmployeeInTagCollectionByEntity\" type=\"application/atom+xml;type=feed\" title=\"EmployeeInTagCollectionByEntity\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/EmployeeInTagCollectionByEntity\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/SalaryCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"SalaryCollectionByEmployee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/SalaryCollectionByEmployee\" />\n <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/VwEmployeesHierarchyCollectionByEmployee\" type=\"application/atom+xml;type=feed\" title=\"VwEmployeesHierarchyCollectionByEmployee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')/VwEmployeesHierarchyCollectionByEmployee\" />\n <title />\n <updated>2020-04-09T11:25:13Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Id m:type=\"Edm.Guid\">3b952b60-2502-4ab2-a967-7f898f8b8b55</d:Id>\n <d:Name>Megan Lewis</d:Name>\n <d:CreatedOn m:type=\"Edm.DateTime\">2017-03-30T14:51:27Z</d:CreatedOn>\n <d:CreatedById m:type=\"Edm.Guid\">76929f8c-7e15-4c64-bdb0-adc62d383727</d:CreatedById>\n <d:ModifiedOn m:type=\"Edm.DateTime\">2017-03-31T07:30:20Z</d:ModifiedOn>\n <d:ModifiedById m:type=\"Edm.Guid\">76929f8c-7e15-4c64-bdb0-adc62d383727</d:ModifiedById>\n <d:ProcessListeners m:type=\"Edm.Int32\">0</d:ProcessListeners>\n <d:ContactId m:type=\"Edm.Guid\">27bbc601-2d48-4652-8d18-eb93e718a78c</d:ContactId>\n <d:OrgStructureUnitId m:type=\"Edm.Guid\">43172897-fbd6-4bc1-b81b-55964ab558e6</d:OrgStructureUnitId>\n <d:Notes></d:Notes>\n <d:JobId m:type=\"Edm.Guid\">955472f0-56e6-df11-971b-001d60e938c6</d:JobId>\n <d:FullJobTitle>Customer manager</d:FullJobTitle>\n <d:OwnerId m:type=\"Edm.Guid\">76929f8c-7e15-4c64-bdb0-adc62d383727</d:OwnerId>\n <d:CareerStartDate m:type=\"Edm.DateTime\">2019-11-10T00:00:00</d:CareerStartDate>\n <d:CareerDueDate m:type=\"Edm.DateTime\">0001-01-01T00:00:00</d:CareerDueDate>\n <d:ProbationDueDate m:type=\"Edm.DateTime\">2020-02-10T00:00:00</d:ProbationDueDate>\n <d:ReasonForDismissalId m:type=\"Edm.Guid\">00000000-0000-0000-0000-000000000000</d:ReasonForDismissalId>\n <d:AccountId m:type=\"Edm.Guid\">e308b781-3c5b-4ecb-89ef-5c1ed4da488e</d:AccountId>\n <d:ManagerId m:type=\"Edm.Guid\">e17c9cd6-262d-481d-86a9-f09a82984e0e</d:ManagerId>\n </m:properties>\n </content>\n </entry>\n</feed>"
}
]
}