|
POST
|
I have a point feature class with attachments. While I can see the attached items in the identify tool I cannot directly access the items through the related tables which does not make sense to me. Is that the desired behaviour? When I want to remove an attached item it is not very comfortable to look for the right file in the whole table. Instead I would expect to get the attached items through the related table function and then would easily be able to remove the desired file. Did I miss something?
... View more
02-24-2019
03:36 AM
|
0
|
6
|
1934
|
|
POST
|
Attached is a zip file that contains a toolbox with a script tool, the corresponding script and a test file. When you run the script tool it might throw the bad descriptor error again (as reported in my other posting) but you can just click ok and run the script. Sometimes you have to press ok twice. Select as directory the directory where you saved the txt file (propably the main folder of the zip). I left you three parameters with a couple of values, two with special characters and one simple one. In the script at lines 105 and 106 I write min and max values to a directory where I would like to have proper (readable) names, that's why I am using an extra variable (field_text, list is listfields_text) here. I need these values again from line 130 where I am creating a graph from the table values. Here I will need to loop through the field names again but cannot figure out how to reference them in a way it would be recognized in the table as column. In line 70 I found a work around which works as long as the parameters with special characters are limited (normally there are two more in the table) but it is not very elegant. I could do the same with the loop for the graphs but I feel like there must be a better way of dealing with these characters. Thanks for looking into it!
... View more
02-23-2019
01:14 PM
|
0
|
0
|
8891
|
|
POST
|
Hi Dan, At which point would you suggest I need to do the decoding? fieldnames=arcpy.GetParameterAsText(3)
fieldnamesliste=fieldnames.split(";")
fieldnames_decoded=[field.encode("utf-8").decode("utf-8") for field in fieldnamesliste]
fieldnames_encoded=[field.encode("utf-8") for field in fieldnamesliste] From what I have seen until now I would assume I have somehow to use the fieldname including the u".." which I get when not en- and decoding or use encoding and decoding: decoded: [u"'Chl_A (\xb5g/L)'"] (which is actually the same as not using encode+decode, which makes sense to me, I don't know why it doesn't print the u for you, but that might be Python3 depending) encoded: ["'Chl_A (\xc2\xb5g/L)'"] But when I read the field name again for using it for my search cursor I get for decoded: field name: 'Chl_A (µg/L)' encoded: field name: 'Chl_A (µg/L)' Somehow I am stuck between this encoding and decoding. It seems like the python script automatically interpretes the hex codes...
... View more
02-23-2019
05:55 AM
|
0
|
1
|
8891
|
|
POST
|
I am using the Query Widget in a Launch pad themed web application (in AGOL web appbuilder). Is there a way to thell the Widget to show the item name instead of the service layer name in the query window as well as for the result layer? Or the name it has in the Web map? On the upper left is the name in the map, the others all show the name of the service layer. So even if I change the layer name in the item's details it will not change the service layer name which just does not look nice to me, and it is not very helpful if the layer in the map is named differently. It would make more sense to me if the search criteria and result would use the same name as in the map to identify which layer was used.
... View more
02-23-2019
04:00 AM
|
0
|
1
|
779
|
|
POST
|
Hello folks, I have to work with txt files that contain special (non-ascii) characters like in "Temperature (°C)" or "Chl_A (µg/L)". When I read the field names directly from the table with utf-8 encoding and list them in Python I get 'Temperature (\xc2\xb0C)' and 'Chl_A (\xb5g/L)'. I receive the names of the fields to work on from a script tool where the validation tool reads the field names (with utf-8 encoding) and gives them back as a list to chose from (where they look "properly spelled"). These chosen ones are then received from my python script with GetParameterAsText and then split up. fieldnames=arcpy.GetParameterAsText(3)
fieldnameslist=fieldnames.split(";") When I read and write those I get [u"'Chl_A (\xb5g/L)'", u"'Temperature (\xb0C)'"] Note also the difference between the first and the second output: (\xc2\xb0C) and (\xb0C) which seem to be two different unicode encodings. When I read them again in a new list with utf-8 encoding I get ["'Chl_A (\xc2\xb5g/L)'", "'Temperature (\xc2\xb0C)'"] Now when I try to use the field name again to read from the table the values I need for further calculations the field name is not recognised and I guess that is because of the encoding. Interestingly (at least for me), when I read from the utf-8 list or from the other the field name I get again "Temperature (°C)" or "Chl_A (µg/L)" as an output. So I assume I have to "translate" the symbols back into hexa spelling to be able to communicate with the txt file. When I hardcode the field name to be 'Chl_A (\xb5g/L)' in the arcpy.message I still get Chl_A (µg/L) but then the search cursor complains that "'utf8' codec can't decode byte 0xb5 in position 7: invalid start byte". When I use u'Chl_A (\xb5g/L)' the field name is recognized. How can I give the field names from my list so that the script can read them and they are recognized in the table again for the search cursor? I'm using Python 2.7.14 with ArcMap 10.6.1 PS: Looking for further information I tumbled over this read, which might give you something to laugh for today: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excu… (plus some well explained information I think, but it didn't help solve my problem...).
... View more
02-23-2019
02:34 AM
|
0
|
7
|
10391
|
|
POST
|
Funnily, sometimes I get the "Bad file descriptor" error message, sometimes I don't. But most of the times the tool is running properly.
... View more
02-22-2019
03:33 AM
|
0
|
0
|
4903
|
|
POST
|
I figured out that I should leave the value unset (so just remove the last line before return) to not preset a value. But I still get a "Bad file descriptor" error message...
... View more
02-22-2019
01:30 AM
|
0
|
1
|
4903
|
|
POST
|
Only that I get now an error message when trying to execute the tool: If I interprete the line numbers correctly (does it count in the comments?), line 4 should be list_of_files = arcpy.ListFiles("*.txt") (or around there) and line 51 would be the last line. But I can click OK and then my main script starts running. It still behaves a bit funny because it would not allow me to "unselect all fields". Also when I unselected a couple of field names then they would be turned back on when clicking "OK" to start the tool. The same the other way around: When I put the value='' then it would not allow me to make a selection. Not perfect yet...
... View more
02-22-2019
01:01 AM
|
0
|
2
|
4903
|
|
POST
|
Thanks Randy but it still not returning the field names in the required way. This is only writing "Short" as an option to my choice list and also this has the wrong data type because it is not a field name. I don't even know where "Short" is coming from. I am debugging in PyScripter and everything works fine except of pushing the values back. I need a multiple values list to select my field names from. Ha, I changed the data type to string and then the tool accepts the input but when executing the tool! I passed the list as it is: self.params[3].filter.list=sorted(fieldselectlist)
self.params[3].value=sorted(fieldselectlist)
I'm not sure though if the first line is even necessary. But it works. Now I just have to adjust the main script to "eat" my list...
... View more
02-22-2019
12:22 AM
|
0
|
3
|
4903
|
|
POST
|
Related to my question Showing different views in web map depending on named user I am working now on the workaround. I have a feature service with related tables. In the feature service are different sites that I can filter and save as a view but it would not filter the related tables. Now I filtered the tables in the web map but when I share the view of my table with the user that should only be able to see his site's data he can open the layer in the back end of AGOL and can still access the full tables. What can I do? I also tried with a query on the table before publishing but it is still uploading the full table. My (totally not satisfying solution) for now is to save the seperate sites with their related tables in extra feature services. This is not really a sustainable solution especially when the data will be updated sooner or later... Besides, is there somehow a way to share only the final application with someone without giving them access to the sub products (feature service, web map,...) ? Ideally I would like to share only the final story map with the user that has the apps limited to his site. But as soon as he can see the base url of the story map he would also be able to login to the content page etc. I am happy to hear what ever ideas you have to solve this...
... View more
02-21-2019
12:18 PM
|
2
|
6
|
3653
|
|
POST
|
Would I need to open a support case for that or who can I ask to change it?
... View more
02-21-2019
11:37 AM
|
0
|
1
|
1236
|
|
POST
|
Is it only me who doesn't like that kind of styling?
... View more
02-21-2019
11:08 AM
|
0
|
3
|
1236
|
|
POST
|
I am using the time slider widget within a Launchpad themed AGOL web application. I am wondering if nobody else is annoyed about the fact that the style of the text does not match at all the other text within the application. This looks so stupid! Is there a way to fix this somewhere in the json maybe or do I need to submit a case for this?
... View more
02-21-2019
06:33 AM
|
2
|
5
|
1321
|
|
POST
|
I also didn't open a support case yet. I was still hoping to narrow down the problem. But I just ran into the same problem again, this time with the launchpad theme and a different layer/web map. The error I see in the web console says Cannot read property 'push' of undefined and we didn't do anything with Arcade on these popups. At least I made the Attribute Table Widget accessible again by removing the Configuration in the Json (in ago-assistant) inside the widget definition. {
"uri": "widgets/AttributeTable/Widget",
"version": "2.11",
"position": {
"right": 20,
"bottom": 80,
"relativeTo": "map"
},
"closeable": true,
"id": "widgets_AttributeTable_Widget_27",
"name": "AttributeTable",
"config": {
...
} Nicholas Schoenborn, would you mind adding me to the case if you submit one? (I think that is possible...)
... View more
02-21-2019
06:25 AM
|
0
|
0
|
1866
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-09-2023 03:26 AM | |
| 1 | 02-13-2019 01:51 AM | |
| 1 | 04-03-2025 11:07 AM | |
| 1 | 01-14-2024 01:34 PM | |
| 1 | 10-01-2018 10:23 PM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|