VBScript / Creatio API / $value parameter
Back to Collection Items
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")
http.SetRequestHeader "ForceUseSession","true"
http.SetRequestHeader "BPMCSRF","{{BPMCSRF}}"
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.StringBuilder")
set sbResponseBody = CreateObject("Chilkat.StringBuilder")
success = http.QuickGetSb("https://myserver.com/0/ServiceModel/EntityDataService.svc/Collection1Collection(guid'Id')/Field1/$value",sbResponseBody)
If (success = 0) Then
outFile.WriteLine(http.LastErrorText)
WScript.Quit
End If
outFile.WriteLine("Response status code = " & http.LastStatus)
outFile.WriteLine(sbResponseBody.GetAsString())
outFile.Close
Curl Command
curl -X GET
-H "ForceUseSession: true"
-H "BPMCSRF: {{BPMCSRF}}"
https://myserver.com/0/ServiceModel/EntityDataService.svc/Collection1Collection(guid'Id')/Field1/$value
Postman Collection Item JSON
{
"name": "$value parameter",
"request": {
"method": "GET",
"header": [
{
"key": "ForceUseSession",
"type": "text",
"value": "true"
},
{
"key": "BPMCSRF",
"type": "text",
"value": "{{BPMCSRF}}"
}
],
"url": {
"raw": "{{BaseURI}}/0/ServiceModel/EntityDataService.svc/{{CollectionName1}}Collection(guid'{{ObjectId1}}')/{{FieldName1}}/$value",
"host": [
"{{BaseURI}}"
],
"path": [
"0",
"ServiceModel",
"EntityDataService.svc",
"{{CollectionName1}}Collection(guid'{{ObjectId1}}')",
"{{FieldName1}}",
"$value"
]
},
"description": "Request for getting a field value of an object collection instance by Id via the [$value](https://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/#requestingapropertysrawvalueusingvalue) parameter."
},
"response": [
{
"name": "[200] Gets a field value",
"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(guid'c31c7862-fe33-4a13-9bbc-0943fa08fd02')/Name/$value",
"protocol": "https",
"host": [
"myserver",
"com"
],
"path": [
"0",
"ServiceModel",
"EntityDataService.svc",
"EmployeeCollection(guid'c31c7862-fe33-4a13-9bbc-0943fa08fd02')",
"Name",
"$value"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Content-Type",
"value": "text/plain;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": "1.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:18:51 GMT"
},
{
"key": "Content-Length",
"value": "14"
}
],
"cookie": [
],
"body": "William Walker"
}
]
}