Select to view content in your preferred language

QueryBuilderControl with DataConnection (not MapMember)

266
1
02-20-2026 12:25 PM
AdamDavis
Frequent Contributor

Hi,

I am using the inbuilt QueryBuilderControl successfully with a FeatureLayer but need to use it straight from a Feature Class. Unfortunately, the control only seems to be able take a MapMember (ie Layer or Table).

Is there any way to use it with a DataConnection? The Select Features GP tool seems to be able to work that way. I did see that there is a TextExpressionBuilder control that can take a DataConnection but it is internal.

One other way I thought I might get round it is to make and use a Layer object (and not add it to a Map) but the Layer Factory forces addition to a map? Is there a sneaky way to make a Layer object without adding to a map?

Thanks in advance,

Adam

 

 

0 Kudos
1 Reply
SelimDissem
Esri Contributor

Hi @AdamDavis

The QueryBuilderControl only works with a MapMember by design and there's no workaround for that.

The closest you can get with features offered by ArcGIS Pro is to leverage the Query Layer functionality (CommandID esri_mapping_makeQueryLayerButton) that takes a data connection but you'd have to build a UI for it.

0 Kudos