Synced Query definition

673
4
09-08-2022 08:56 AM
Status: Under Consideration
Labels (1)
CA_SC_-_EricBall__GISS_
New Contributor II

Right now we have numerous project files within our incident folder, each with the same definition query filtering data on multiple layers. When that data changes, every layer in every project needed to have its DQ updated (or reloaded from saved DQ). It takes forever!

It would be great to have a synced query file option. That way I could make a change to DQ file and it would update any layer in any project that was pointing to it.

4 Comments
TanuHoque
Status changed to: Under Consideration
 
LindsayRaabe_FPCWA

This would be a welcome addition. I've managed to write a python script that runs as a tool where you can input a value and it creates definition queries against specified layers, but it does need to be maintained if layers are renamed/added/remove, and it doesn't update or remove existing queries - they just stack up if you run it more than once. 

AlexZhuk

Currently, the definition queries are hardcoded in the layers. (Thanks, Pro offers some improvements over ArcMap.)

Now, I have a project with many layouts and many maps. Those maps are organized differently, yet they all contain similar layers. I found that if I change a layer's query definition in one map, I then must find the same layer in all other maps and change them too, accordingly. It's a lot of extra work. I wish all those layers had a definition query based on some "server" feed: then I'd have to change it in one place only and be sure that all the layers in all maps be synchronized. That "server" can be just a utility within the Pro project or reside elsewhere.

Example: instead of <TYPE = 'HYDRANT'> the query in all related layers would be <DefQrySrv_String = 'Util_2022_Nov'>.

Thanks!

CA_SC_-_EricBall__GISS_

I ended up writing a python to tool to replace a string with a new value within all defqueries. it currently searches every project, every map and every layer within a folder. It works, but am working on making it a more elegant solution with more options.. it would still be much better to have an actual synced/linked DQ option.