|
POST
|
Can you post a screenshot of how your layers are organized? Also, it helps to see formatted code: Code Formatting... the basics++
... View more
09-21-2018
10:33 AM
|
0
|
3
|
4940
|
|
POST
|
You may have some issues with how you are using getSelectionSet. My test code: mxd = arcpy.mapping.MapDocument("CURRENT")
layerName = 'street'
lyr = arcpy.mapping.ListLayers(mxd, layerName)[0]
for l in lyr:
print l.name, l.getSelectionSet(), len(l.getSelectionSet()) if l.getSelectionSet() is not None else 'None'
# and if you only want to work with layer named 'street'
if l.name == 'street':
# do something
... View more
09-21-2018
10:05 AM
|
0
|
0
|
2051
|
|
POST
|
A bug report has been submitted: #BUG-000116957 [Enhancement] Services published from ArcMap to ArcGIS Online that contains a feature that is symbolized using coded domains, do not contain the domain description in ArcGIS Online. Workaround Create a feature template before publishing to ArcGIS Online. Can also edit the json of the feature layer to include a description.
... View more
09-21-2018
09:30 AM
|
0
|
0
|
2237
|
|
POST
|
I would put the domain in a dictionary and use something like (note lines 8, 13-24 and 31): class Tool(object):
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "Tool"
self.description = ""
self.canRunInBackground = False
self.state = { 'New': 1, 'Validated': 2, 'Published': 3} # domain description: domain code
def getParameterInfo(self):
"""Define parameter definitions"""
stateValue = arcpy.Parameter(
displayName = "Select State",
name = "stateValue",
datatype = "GPString",
parameterType = "Required",
direction = "Input")
stateValue.filter.type = "ValueList"
stateValue.filter.list = list(self.state.keys()) # dictionary keys
stateValue.value = stateValue.filter.list[0] # default first item in list
return [stateValue]
# other defs
def execute(self, parameters, messages):
"""The source code of the tool."""
messages.addMessage('Selected: {}, Code: {}'.format(parameters[0].value, self.state[parameters[0].value]))
return If should also be possible to use arcpy.da.ListDomains in some fashion to populate the dictionary if needed.
... View more
09-20-2018
09:53 PM
|
0
|
0
|
1864
|
|
POST
|
If the user starts by selecting a non-unique identifier, like the AsBuiltCompany, then the tool would need to have the user drill down to select the unique row. If the second selection was for ProjectID, then the tool would have a unique row and could populate the remaining choices. To be able to code the tool, there would need to be a specific order to the selections the user makes.
... View more
09-20-2018
11:49 AM
|
0
|
0
|
2431
|
|
POST
|
Would the ProjectID be unique? If so, this would be the selection field, and the tool would pull the other fields on that row. The important thing would be a unique ID that makes sense to the user. The growth of the table should not be an issue, nor the duplication of entries. The tool reads the table when it is first run and when the user makes a change. You would want to make certain that wherever the tool is used, it will have access to the table. Its location could be hardcoded into the tool, or you could add a box in the tool where the user selects which table to use.
... View more
09-19-2018
11:00 AM
|
0
|
3
|
2431
|
|
POST
|
I am still trying to understand your initial selection. My first thought was that the user would select something unique, like a project number, and then get the all other items that are associated with that project. The project number would be a unique identifier for the row. Perhaps you are needing something like a drill down selection. That is, select an AsBuiltType, then select the AsBuiltCompany from a dropdown who is in that type group, and then continue refining the selection. If your table looks like this (with 2 Type 1 entries): Then your tool could present the 2 companies classified as Type 1. Is this what you would like to accomplish?
... View more
09-16-2018
11:05 PM
|
0
|
5
|
2431
|
|
POST
|
Thanks for the additional description of your project. To see if I am understanding correctly… Regarding your question about making the other 4 parameters hidden. I think there is an option for the parameters to be hidden. Showing them could help the user be certain the correct ‘selection’ was made, but it does take space on the tool form. Regarding the date, Document Creation Date would be a manual entry. So it would not depend on any selection. Would you want it to default to today’s date, the AsBuiltDate, or be left blank? I am still a bit fuzzy about the selection part. Would the user be presented with ‘Option 1’, ‘Option 2’, etc? If they select ‘Option 1’, then they would get AsBuiltType = Type1, AsBuiltCompany = Company1, and ConstCompany = Company1. I am assuming that whatever ‘Option 1’ is, it would be descriptive enough for your user to choose the best one. And once a selection is made and a date entered, these parameters will be used to populate a new in a feature class or another table?
... View more
09-14-2018
12:21 PM
|
0
|
1
|
6845
|
|
POST
|
I see a Manage button just to the right of Undo and Redo. This would be on the map you created for your Collector crew. It could be that Server and AGOL are that different. I wonder if it is the permission level with the map you are working with. See: Manage feature templates where it says: Click Manage. You can only see this button if you're the owner of the feature layer or if you are an administrator in your organization.
... View more
09-14-2018
09:32 AM
|
0
|
1
|
2237
|
|
POST
|
I tend to look at the json file first because I've become used to working with it. But there are always a number of ways to do the same thing. Here's another option for you to try. On the "Add Features" screen of your original post, there should be a manage button at the bottom of the screen. Click it. The screen will show "Manage New Features" that will look something like this: Click the diamond to the right of each number and select Properties. For Label, Name and Description, replace the number with the description for the number (domain code) and click done. When you have gone through the list, click "Save Changes". This should update the layer's json file.
... View more
09-13-2018
12:56 PM
|
0
|
3
|
6465
|
|
POST
|
For your photo of "Points of Interest (ID: 0)", what is the basic format of this page's web address? I think the admin page for this layer is where you need to be.
... View more
09-13-2018
10:36 AM
|
0
|
0
|
6465
|
|
POST
|
On my screen, I have a link to 'All Layers and Tables' and a link to each layer between supported query formats and description. I would then select a layer and edit its json data. So, I'm not quite sure how your service is being hosted.
... View more
09-13-2018
10:33 AM
|
0
|
0
|
6464
|
|
POST
|
Hi Vishal, It is possible that I don't completely understand your work flow and what you want to accomplish. What I pictured was a table with a row of options. The tool would query the table and populate a dropdown with a list of options. When an option was selected, other values from that row would populate other sections of the tool. Here's a simplified version of the table I had pictured: Here's what the tool would look like that would access the table: When the tool is initialized, the Selection box is populated with the contents of the table's Selection column, with the first row's data being the default selection. The options associated with the Selection are displayed in the tools other boxes. For example, when "Three" is made as the selection, the other option boxes in the tool would be populated with C1...C4. If this is not what you had in mind, could you provide some examples of the workflow and table layout you were envisioning? Thanks.
... View more
09-12-2018
08:59 PM
|
2
|
1
|
6845
|
|
POST
|
Don't forget that .weekday() for Sunday = 6, so the Monday for Sunday 2018/09/09 is 2018/09/03 and not the following day (the 10th).
... View more
09-12-2018
04:32 PM
|
0
|
0
|
1463
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-27-2016 02:23 PM | |
| 1 | 09-09-2017 08:27 PM | |
| 2 | 08-20-2020 06:15 PM | |
| 1 | 10-21-2021 09:15 PM | |
| 1 | 07-19-2018 12:33 PM |
| Online Status |
Offline
|
| Date Last Visited |
02-12-2026
07:13 PM
|