Select to view content in your preferred language

No Subtypes in AGOL Layers?

2991
19
12-05-2018 07:17 PM
JoeHershman
MVP Regular Contributor

I have an application developed using on on-premise portal which we planned to also deploy using agol (making the bold assumption that feature layers would be defined the same).

Now that we have moved to agol I find that agol feature services do not have subtype definition.  I have published the same service to portal and to agol.  In portal if I look at the json I see the subtype definition, but this does not exist in the agol layer definition.  How can this be?  How could there possibly be a core new feature of the 100.3 API and not have it supported when using an agol layer.  So all this nice clean logic based on subtypes developed for a featurelayers created in ArcGIS Enterprise cannot be used in the application when it uses agol layers and instead have to go backwards and use logic based on FeatureTypes (which was removed from the application in favor of the subtype logic).  All I can do is shake my head as I work late into the night trying to fix the application to work with agol.

-Joe

Thanks,
-Joe
0 Kudos
19 Replies
JoeHershman
MVP Regular Contributor

I know how to get the information using the current agol definition, and it is very convoluted and far more complex from a coding standpoint.  Plus I am now required to have two completely different approaches in a Runtime application depending on if it uses ArcGIS Server 10.6 or agol.  This is a very poor way to support people developing for the Esri platform.

We do have a project to expose and preserve subtypes if you do not specify renderer based on subyptes. This is also an enhacment enterprise has and did not make it in online. This is also planned for UC2019.

First you are not really preserving subtype in the current approach, there is just a way to get to the information throuugh the featureTypes.  These are inherently different things.

As users of esri technology I should be able to expect that both ArcGIS Enterprise and agol grow together.  If Enterprise adds some so significant I should be able to expect it be available in agol.

Thanks,
-Joe
0 Kudos
KhaledHassen
Esri Contributor

Pl. describe what is not working for you for the enterprise and we will be sure it will make it in the next release or so in online.

We are am not really aware of functionality missing in the API regarding subtypes except supporting it outside the renderer (only Pro uses it). As far as the subtypes and how to scale it, it is also an issue with enterprise also since the subtypes are returned in the layer metadata which as you described might not scale if we have many subtypes. Supporting subtypes is work in progress currently in online and we will offer a salable solution shortly.

0 Kudos
JoeHershman
MVP Regular Contributor

The feature layer definition for an ArcGIS Enterprise based service contains the following information included in the following sample information which defines subtypes.

{
 "subtypeField": "ASSETGROUP",
 "defaultSubtypeCode": 0,
 "subtypes":[  {
   "code": 0,
   "name": "Unknown",
   {"defaultValues": {...},
     "code": 1,
   "name": "Value1",
   {"defaultValues": {...}
 ]
}‍‍‍‍‍‍‍‍‍‍‍‍

This is in addition to the types array which you describe and is defined in both the Enterprise definition and the agol definition (e.g.)

"types": [
   ]

The ArcGIS Runtime API parses the json elements and the API has an object model around Subtypes (see the original response to this post).  Because agol does not include these elements in the json, the API can obviously not parse them.  So code written to work with Enterprise 10.6 does not work with agol because the agol feature layer definition does not include the subtype elements

Thanks,
-Joe
0 Kudos
KhaledHassen
Esri Contributor

Great thanks. We will add the subtypes in future release of online as I described earlier. We will handle it when publishing new data, but we will offer you a way to edit existing service layer to add subtypes. I am assuming the APP continue to work without subtypes when migrating from enterprise to online. FYI: we do have many supports properties in the layer and service metadata to indicate what is supported or not (we do not really have on for subtypes - will add it). There will always be differences between feature services in general and will be good to check these supports properties.

0 Kudos
JoeHershman
MVP Regular Contributor

subType != subtype

While it looks like the attempt to add subtype support was included it seems to me that no one took the time to look at the definition in ArcGIS Enterprise and see that the json tag is subtype.  In AGOL it is subType and this doe not appear to parse correctly.

Thanks,
-Joe
0 Kudos
KhaledHassen
Esri Contributor

Will fix it in online sept. release.

What app has this issue? most of our apps (mainly mobile) work fine maybe because the check is case-insensitive.

Until I get the fix in, pl. use case insensitive check if possible.

Thanks

Khaled

0 Kudos
JoeHershman
MVP Regular Contributor

I am using the Runtime WPF API.  Have just checked in the latest version 100.5 and despite the service definition showing a 'subType' array I see no Subtypes in the object exposed by the API.  What type of mobile apps are you developing that you say this is not an issue?  I see in the Runtime API for WPF.  I have not confirmed this issue in the Xamarin API application at this point.

Thanks,
-Joe
0 Kudos
KhaledHassen
Esri Contributor

I am the online feature service lead but working closely with the collector app team which seems do not have this issue.

At any case, I will fix this in the online feature service by Sept. Will touch base with the collector app to see if they have this issue.

Khaled

0 Kudos
JoeHershman
MVP Regular Contributor

What about in addition to the Collector team you talk to the Runtime API team.  It would seem there is a vested interest in things working across the board in a consistent manner with both ArcGIS Server and AGOL.  I don't know how Collector develops their application.  As the Feature Service Lead I would have thought you would consider it critical to discuss the definition with the Runtime team and to have it tested by everyone

If one assumes that the typeId field and the subtypeId field are going to be the same you could gather this information, however, this is not always a valid assumption.  Plus the Runtime API has done the work to have this supported it would be nice not to have to write a bunch of code that is only needed in the case of AGOL cases.

Rex Hansen

Thanks,
-Joe
0 Kudos
KhaledHassen
Esri Contributor

Sorry for the confusion. We will get handled. The definition is mainly owned by the feature service and the runtime originally developed based on server. This is new in online and it looks like we have some differences in the case of the types. Runtime team does not define what the subtype json is and they have been involved in testing but it looks like this issue is not detected.

The main reason I have mentioned about the collector is that we have recently fixed an issue that affected collector and was related to subtype default.

I wanted to know the severity of the issue and if we need to handle it before Sept. release.

If this issue is critical to you, pl. submit a request for us to the tech support (online feature service) and I will see if we can speed up the deployment. 

0 Kudos