The point of this project is to find the deceased's name in a cemetery so the public can find them easily. I have uploaded a shapefile of cemetery lots and a table of lot occupants (so I did a 1:Many join). The configured pop-up windows will show the occupants when I click "Show Related Records". However, I can only search through the source layer, not the related records. Ideally, I could search "Bob Smith" and it would take me to the right polygon, but this is not possible. From my research, I haven't found any work-arounds (no widget or web application template works). I don't want to split every polygon so I can add all the occupants names in, that would take ages. Would a query table help? Does anybody know of any?

enter image description here

  • What's your max number of occupants per plot?
    – geoJshaun
    Dec 5, 2016 at 22:10
  • To split polygon into N parts is no big deal, because it can be easily automated, alternatively you can put multiple polygons on the top of each other
    – FelixIP
    Dec 6, 2016 at 0:17
  • @FelixIP splitting polygons into N parts is sort of my last resort because if I split the polygons, the wrong people might be in the wrong spot, whereas I know everyone is encompassed by the lot now. How could I automate overlaying 'N' polygons? Dec 7, 2016 at 14:11
  • @ShaunO anywhere from 1-20, it's hard to tell. Dec 7, 2016 at 14:11
  • 1
    Would love it if you could explain your solution with screenshots in a new answer. I was hoping to answer this Q on how you can search related records.
    – jakc
    Dec 9, 2016 at 9:20

1 Answer 1


If you don't mind stacking the polygons (making a duplicate for each name in the plot) you can give this python code a whirl (note:depending on the number of names it could take a long time to process):

import arcpy

#make a scrap gdb for merge files
arcpy.env.workspace = r"C:\somejunk.gdb"

# Make a list of the deceased with a cursor
dTable = r"C:\some.gdb\table"
plotFC = r"C:\some.gdb\plots"

dList = []
idList = []

# Add a name field to the plot feature class

arcpy.AddField_management(plotFC, "Name",TEXT)

#make a list of the deceased and a corres[ponding list with matching plot IDs that your'e using for the current relate

with arcpy.da.SearchCursor(dTable, ["dTable_ID", "Name"]) as cursor:
    for row in cursor:
    del row

# Make a zipped list to get the name and IDs as a tuple
DiDlist = zip(idList,dLsit)

#loop through list of deceased, give the current record name to the plot and make a separate feature class
for i in DiDlist:
    with arcpy.da.UpdateCursor(plotFC, ["plotfc_ID", "Name"]) as cursor:
        for row in cursor:
            if row[0] = i[0]:
                row[1] = i[1]
                arcpy.FeatureClasstoFeatureClass_conversion(plots, r"C:\somejunk.gdb", "Grave_" + i +"_"+ row[1])
        del row

#make a list to use as the inmput for a merge

mergeList = arcpy.ListFeatureClasses()

#merge duplicate plot features
arcpy.Merge_management(mergeList, "All_graves")

It will need tweaking to be compatible with your data but you should be able to get the gist from this. You can take it a step further and make an x and y field to calculate the polygons' centroids using the calculate geometry tool, convert the x, ys to points, and then randomize each point within the plot for a density visual or if you don't want your features stacked on top of one another. The python op should give you enough to publish and when you do a name search it should take you to the plot and show you the name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.