I have a sewer manhole feature that is related to a manhole inspections table. I would like to symbolize the feature using a field in the related table.
I cannot see of a way to go this in the symbology tab of the feature properties dialogue box.
Some questions to try and clear up some doubts:
The related table is 1:M relationship that I would like to symbolize by a field called "Inspected". This is just a text field that only contains yes or no text.
This are the properties.
I just want to be able to show the inspected manholes in green and the others on red but in the symbology tab if I choose to symbolize by category I do not have access to the fields in the related table.
Thanks
The fact that you have 1:M cardenality could mean that a single manhole could have multiple values for the field inspected. Is that the case? If so, how would you want to visualize that?
Yes that is the case. This is a collector app for our sewer field inspection crew. They just need to be able to see which manholes they have or have not inspected. So I guess there could be more than one inspection on a manhole but it may have "yes" in the inspected field multiple times if they have inspected it more than once.
Sounds like I might have to place this field in the feature table instead of the related table.
Thanks to everyone for their help. I will move my inspected field to the feature table as suggested.
Neil,
I just finished creating a model which symbolizes SMH Inspections based on when the inspection was entered into the related table. It is based on a field in the SMH Feature, exactly like what Randy was talking about above, but joined to the Inspection Table and run using a Python script in Windows Task Scheduler. I populate that field with a "Yes" to indicate it was inspected within the last month (Green Diamond), which is hidden and not editable by field staff. When a month elapses, the yes will change back to <Null> and the symbology will change back to a Red Diamond.
This is the basic outline:
The first 4 tools clear any of the existing "Yes"(s) in the Feature Class and allow it to be populated with the most recent data.
You then join the SMH Inspection FC and the Inspection Table. You MUST make the FC a Table View first however, or the tool will not run when called in Python.
The Inspection Table must be made into a Query Table so you can pull the records within the last month. Here's what that looks like:
Make sure to enter in the time you want in the Expression. I will ultimately use the 'created_date' field. This will pull all records in the last 30 days.
Then Join to the FC Table View and keep only matching records.
Field Calculate the designated field in the FC with a value (Yes for me)
Remove the Join.
In order to get this to run automatically, open IDLE and enter the following:
<SPAN class="keyword token">import</SPAN> arcpy <SPAN class="comment token">#Copy Toolbox Path Properties>Location</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ImportToolbox<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"C:\Users\USER NAME\AppData\Roaming\ESRI\Desktop10.5\ArcCatalog\DATABASE NAME.sde\TOOLBOX NAME (do not include .tbx)"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#Copy FC Path Properties>Name, You must assign an Alias to the Toolbox</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ToolboxALIAS<SPAN class="punctuation token">.</SPAN>ModelName<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"C:\Users\USER NAME\AppData\Roaming\ESRI\Desktop10.5\ArcCatalog\DATABASE NAME.sde\FEATURE CLASS NAME"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token">#This is the first parameter at the beginning of the model</SPAN> <SPAN class="comment token">#You may need to change the backslashes to forward slashes</SPAN> <SPAN class="keyword token">print</SPAN> <SPAN class="string token">"Completed"</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Run at your convenience with Windows Task Scheduler.
I know this is more than what you want so you can definitely eliminate the time part of it if you just want to see that it was inspected at some point. I just put this all together since others may find it useful and I literally just finished it so it's still fresh in my mind.
Fred
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.