Using SOI to add fields

5759
6
01-12-2016 11:26 PM
AlexGunko
New Contributor

Hey, I was wondering if it possible to use SOI to add fields to a layer in a map server.

I know I can add attributes to graphics, but I need to add a field for fillter expression.

If it matters, I develop the SOI in .Net

Thanks.

0 Kudos
6 Replies
nicogis
MVP Frequent Contributor

HI Alex can you give further details ? SOIs can pre and post process request Server Object so you can do filter/query a field not exposed via rest from arcgis server

0 Kudos
AlexGunko
New Contributor

Hey, I want to add a field with an SOI, I mean like, when someone access the map server (e.g access the url "http://server.domain/arcgis/rest/MyMapServer/MapServer/0"), the SOI checks if a specific field is exists in the following layer and if it's not, then add it to the layer. That way when I want to export the map server with a filter expression, I can filter it with the new field.

Thanks.

0 Kudos
nicogis
MVP Frequent Contributor

if a field isn't exposed in a layer of service you can do a soi that filter in feature class underlying of layer and return a export filtered. If you want expose a field of feature class permanent (not visible when you have published service) you need a edit service and restart service using rest admin api

0 Kudos
AlexGunko
New Contributor

Hey, let me describe my problem in a different way. I have a map server that displays data about house locations from a database, and every house has an unique ID. I have an external service that gives me extra details about each house. What I would like to do is joining the data from the database and the external service and display it in the client side. I know I can can code it in javascript, etc. But I would like that it will happen in the server side (e.g an SOI that will do that).

Thanks!

0 Kudos
nicogis
MVP Frequent Contributor

you have a post process Server Object (your query from client). You combine this json with json from your external service using library JSON.NET and send to client

0 Kudos
Ranga_Tolapi
Occasional Contributor III

Hi,

Will you be able to provide a sample SOI on the below please. Thank you.

 

if a field isn't exposed in a layer of service you can do a soi that filter in feature class underlying of layer and return a export filtered.




0 Kudos