i am trying to change a value in a hosted feature layer (im owner) using the calculate endpoint [Supports Calculate: true] however i keep getting this "Requested operation is not supported by this service." error.

190
0
08-06-2020 07:15 PM
yunsung
New Contributor

I've tried it with both the input at the /FeatureServer/0/calculate html , as well as via javascript api.

i've tried all the different combinations of input, for the html input:

where=objectid = 1

"calcExpression":[{"field" : "guid", "value" : "3"}]

and for the javascript api:

let xhr = new XMLHttpRequest();

xhr.open('POST', 'https://www.example.com/FeatureServer/0/calculate?f=pjson');
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
xhr.send(JSON.stringify([
 {
"where": "OBJECTID = 1",
"calcExpression":[{"field" : "guid", "value" : "3"}]
}
]));

and:

let xhr = new XMLHttpRequest();

xhr.open('POST', 'https://www.example.com/FeatureServer/0/calculate?where="objectid=1"&f=pjson');
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
xhr.send(JSON.stringify([
 {
"calcExpression":[{"field" : "guid", "value" : "3"}]
}
]));

Every request is returning "Requested operation is not supported by this service." error.

0 Kudos
0 Replies