Hello community,
I have a question, is it possible to update rows in a list of elements in more than one element using only one action in Inwoke REST WEB service?
For example, /api/data/v6.0/db/1/elements/1111, 12222?
Hello community,
I have a question, is it possible to update rows in a list of elements in more than one element using only one action in Inwoke REST WEB service?
For example, /api/data/v6.0/db/1/elements/1111, 12222?
Hi Marcin,
the simple answer is no, this is not supported.
You could create a user voice to support batch processing:
https://www.odata.org/documentation/odata-version-3-0/batch-processing/
The idea of it is to send multiple requests to a server so that all of them get executed but even in this case you would need to create the complete request including the bodies and "join" them in the batch request.
Best regards,
Daniel
Hi Marcin,
the simple answer is no, this is not supported.
You could create a user voice to support batch processing:
https://www.odata.org/documentation/odata-version-3-0/batch-processing/
The idea of it is to send multiple requests to a server so that all of them get executed but even in this case you would need to create the complete request including the bodies and "join" them in the batch request.
Best regards,
Daniel
Thanks Daniel for answer, I will create a user voice, maybe something will change.
Marcin, you can create an SQL query that retrieves data using WFD_ID and includes the details of the item list you want to update and using a REST API, you could integrate it into an automation process by specifying the WFD_ID from the source, the item list, and the automation action. This would allow the automation to update the data for all the records returned more than one in one action
As far as I know, it’s not possible to create an automation for a recurring action
Marcin, you can create an SQL query that retrieves data using WFD_ID and includes the details of the item list you want to update and using a REST API, you could integrate it into an automation process by specifying the WFD_ID from the source, the item list, and the automation action. This would allow the automation to update the data for all the records returned more than one in one action
As far as I know, it’s not possible to create an automation for a recurring action
Hi Krystian, I recently did this in a similar way using sql and FOR EACH.
Thank's for your interest anyway
BTW, can I now use multiple id's in the JSON request in the row ID? as below:
{
"itemLists": [
{
"guid": "bc3d3cff-f44f-4e50-9844-ef1e3d809cb1",
"rows": [
{
"id" : [1111, 222],
"cells": [
{
"guid": "e4997a24-a809-4827-9de7-ce44ace2f32c",
"value": false
}
]
}
]
}
]
}
Hi Krystian, I recently did this in a similar way using sql and FOR EACH.
Thank's for your interest anyway
BTW, can I now use multiple id's in the JSON request in the row ID? as below:
{
"itemLists": [
{
"guid": "bc3d3cff-f44f-4e50-9844-ef1e3d809cb1",
"rows": [
{
"id" : [1111, 222],
"cells": [
{
"guid": "e4997a24-a809-4827-9de7-ce44ace2f32c",
"value": false
}
]
}
]
}
]
}
Yes for each! :) You can't use this "id" : [1111, 222],
one number DET_ID, one posiotion
You can do this with a business rule that returns data for the specified `WFD_ID` and use auto JSON to generate full JSON
What do you mean by using auto JSON to generate full JSON?
Generate for you item list example
DECLARE @tmp_WEBCON TABLE (WFD_ID int,DET_ID int, DET_ATT1 varchar(100), DET_ATT2 varchar(100));
INSERT INTO @tmp_WEBCON
select 1 AS WFD_ID
,1111 as DET_ID
,'TEST_1' as DET_ATT1
,'TEST_TEST_1' as DET_ATT2
union
select 2 AS WFD_ID
,2222 as DET_ID
,'TEST_2' as DET_ATT1
,'TEST_TEST_2' as DET_ATT2
select * from @tmp_WEBCON
FOR JSON PATH
Result:
[
{
"WFD_ID":1,
"DET_ID":1111,
"DET_ATT1":"TEST_1",
"DET_ATT2":"TEST_TEST_1"
},
{
"WFD_ID":2,
"DET_ID":2222,
"DET_ATT1":"TEST_2",
"DET_ATT2":"TEST_TEST_2"
}
]