Error code 400 when I publish a feature with a Definition query

5405
2
Jump to solution
12-14-2020 01:32 PM
Labels (1)
wilcow
by
Occasional Contributor

I have a feature class in Enterprise GIS that has a related table (simple relationship, 1:M). 

I have a definition query on the features based on a field in the related table:

FacilityID_INT IN (SELECT FID_INT FROM SS_Spills WHERE Spill_Overflow IS NOT NULL)

and when I attempt to publish to AGO, it fails with this error in the log: "StatusMessage: Server Response: ERROR: code:400, Invalid URL, Invalid URL, Bad syntax in request."

When I remove the DQ, the feature publishes fine.

I would simply filter the feature layer on AGO after I publish but there's no way that I can see to use subsets or SQL in AGO

Any thoughts on what could be fouled up in that definition query? 

0 Kudos
1 Solution

Accepted Solutions
Robert_LeClair
Esri Notable Contributor

This is a known issue.  One workaround is to export the feature class out to a new feature class based upon the DQ and publish the new layer to ArcGIS Online.  Then you don't have to worry about an ArcGIS Online filter for subsets.

View solution in original post

0 Kudos
2 Replies
Robert_LeClair
Esri Notable Contributor

This is a known issue.  One workaround is to export the feature class out to a new feature class based upon the DQ and publish the new layer to ArcGIS Online.  Then you don't have to worry about an ArcGIS Online filter for subsets.

0 Kudos
wilcow
by
Occasional Contributor

Well, thanks for the response.

I was able to publish the FL to Portal with the definition query, but ran into other (separate) issues with that.

Eventually I settled on only publishing the related table to AGO (as a web feature) so I could create a Survey123 form against that.

May still have to resort to a separate feature class as you describe ... 

Thanks again!