POST
|
Thanks for the suggestion. Unfortunately a map refresh does not activate the definition query. It seems they can only be activated by opening the layer properties, clicking on the definition query, and then clicking OK.
... View more
03-10-2022
04:26 PM
|
0
|
0
|
3980
|
POST
|
The script completes. I am using 2.8.3, and ArcMap 10.8.1.
... View more
03-10-2022
04:17 PM
|
0
|
0
|
3982
|
POST
|
I am using a simple python script to add a definition query to all the layers in my map. The definition query appears to be successfully added to each layer, but isn't being applied until I open the definition query properties of each layer individually and then hit OK. Is there something else I should be adding to my script to actually apply the query to each layer? Here is my script: aprx = arcpy.mp.ArcGISProject("CURRENT") m = aprx.listMaps("Staking Job")[0] for lyr in m.listLayers(): if lyr.supports("DEFINITIONQUERY"): lyr.definitionQuery = "st_workorder_ref_guid = '19205_SF'" And here is a screenshot showing the contents when I open the query definition properties: Again, the def query gets added, but doesn't actually get applied until I open the properties and hit OK without making any changes. Additional info: I tried the same thing in ArcMap (script was slightly different), and although it did update the definition query, I also got ArcMap Drawing Errors, with the message: "Underlying DBMS error [[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ''.]". If I add the definition query manually, although it looks identical to the one created by the script, I don't get any error and the layer draws normally.
... View more
03-10-2022
11:29 AM
|
0
|
7
|
4021
|
EVENT
|
Thank you for the reply, Alexa. I figured it might be that way.
... View more
03-02-2022
01:39 PM
|
0
|
0
|
654
|
EVENT
|
I've not attended an in-person UC before. I'm trying to book my flight home on Friday, but there is no agenda or schedule yet besides the dates and times shown here. I would prefer not to get home super late. What usually happens on the last day of these conferences? Does it really go till 5pm? Can the last afternoon be skipped without missing too much?
... View more
03-01-2022
09:18 AM
|
0
|
1
|
663
|
POST
|
Hi Jessica, this appears to have been solved by a solution to what I though was an unrelated problem--an arcade expression I was using in this layer's pop-up was not calculating correctly in the pop-ups, but was showing correctly in the Detail window. @jcarlson gave me a simplified expression and it solved both issues. The original expression was: var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N'] lookup[ Round(Number( Split( Text( $feature["WIND_DIRECT"] / 11.25), '.')[0]) / 2)] and it was edited to: var d = Floor(($feature["WIND_DIRECT"]+ 11.25) / 22.5)
var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N']
return lookup[d] I don't know if an arcade expression is causing your issue also, but it's worth looking in to.
... View more
12-20-2021
11:56 AM
|
0
|
0
|
928
|
POST
|
Thank you! I was trying to play in the Arcade Playground, but I couldn't understand how to reference layers in order to use the fields as Globals. What am I missing there?
... View more
12-20-2021
11:49 AM
|
0
|
1
|
870
|
POST
|
Josh, thank you so much. I went with your second idea and it did fix the issue. Not only that, but it fixed the other issue I was having, which was the wrong feature attributes would appear on the pop-up. This is my first foray into using arcade, so I have a lot to learn.
... View more
12-20-2021
11:43 AM
|
0
|
3
|
874
|
IDEA
|
I agree! Why is it possible to filter off relative dates "in the past", and yet "in the next" is not possible? Very frustrating.
... View more
12-20-2021
11:08 AM
|
0
|
0
|
358
|
POST
|
When I click on any feature in one particular layer, the pop-up shows information for the wrong feature. It's only happening in one layer, and it does not happen in Map Viewer, just Dashboard. It happens for all features in that layer, and it seems like it throws up a different random wrong feature each time. Oddly, the correct features do show in the detail window for the layer, which is set to only show features in the current extent.
... View more
12-20-2021
10:49 AM
|
0
|
2
|
961
|
POST
|
For some reason, the arcade expression I am using to convert wind directions from degrees to compass rose letters, which works perfectly in Map Viewer is not working properly in Dashboard. When a feature is identified on, the pop-up always shows the wind direction as "N", no matter what the actual compass value. In Map Viewer it converts the compass direction to the correct corresponding letters. Oddly, it also works correctly in Dashboard when that same layer is added to a "Details" window, with the wind direction being displayed with correct compass directions, such as N, NE, S, SE, etc. The expression I am using is: var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N'] lookup[ Round(Number( Split( Text( $feature["WIND_DIRECT"] / 11.25), '.')[0]) / 2)]
... View more
12-20-2021
10:38 AM
|
0
|
5
|
895
|
POST
|
I wanted to follow up o this for others who may be struggling with the same issue. While there may have been other initial problems that we had to work through, I'm embarrassed to say that the ultimate issue was that the subtype field for the feature layer in the mxd was not turned on before sharing the service. In my defense, none of the esri support people caught that either, and I eventually figured it out through a methodical trial and error process.
... View more
04-08-2021
10:29 AM
|
1
|
0
|
2366
|
POST
|
Wow Xander, this is awesome. What a shame the OP never responded to indicate if it was the solution they needed.
... View more
07-30-2020
07:33 AM
|
1
|
1
|
1160
|
POST
|
David, thanks so much for putting me on the right path (get it?). I tried removing the folder connection--same problem. I contemplated how I might try on another user profile, since I'm basically the only ArcMap user at my organization anyway, and I'm also working remotely right now. That got me thinking though, that the user profile is basically just the Normal.mxt, so I renamed it, and voila! Fixed! I was able to add these rasters back to my existing map and they show the correct path! Most likely I could have left my folder connection, and just renamed the Normal.mxt. Good old esri--just try random stuff until something works. Really appreciate your help.
... View more
07-23-2020
02:05 PM
|
0
|
1
|
765
|
Title | Kudos | Posted |
---|---|---|
2 | 02-02-2023 11:51 AM | |
1 | 04-08-2021 10:29 AM | |
1 | 07-30-2020 07:33 AM |
Online Status |
Offline
|
Date Last Visited |
03-14-2023
01:27 AM
|