POST
|
I realise there is a solution here but wanted to add a script for use in an ArcGIS Pro which creates a new polygon row in a feature class based on the current extent. The script also adds a scale from current extent to a field called SCALE (it will need to exist in feature class for it to work). This is particularly useful for users who are trying to build map books using data driven pages. Users will just need to create a script within a toolbox and add a parameter that is a feature layer type so that users can input a feature class for it to work. Here is script: # Import system module import arcpy # Input parameter for feature class name feature_class_name = arcpy.GetParameterAsText(0) # Extracting the geodatabase path from the feature class name geodatabase = "\\".join(feature_class_name.split("\\")[:-1]) # Ensure overwriting of output data arcpy.env.overwriteOutput = True # Select the current project map aprx = arcpy.mp.ArcGISProject("CURRENT") # Select the current map layout map_layout = aprx.listLayouts()[0] # Extract the extent of the selected data frame map_frame = map_layout.listElements("MAPFRAME_ELEMENT")[0] extent = map_frame.camera.getExtent() polygon = extent.polygon # Append a new row to the existing feature class arcpy.management.Append([polygon], feature_class_name, "NO_TEST") arcpy.AddMessage("Polygon appended to the existing feature class.") # Get the current layout scale current_scale = map_frame.camera.scale # Check if the SCALE field exists field_exists = False for field in arcpy.ListFields(feature_class_name): if field.name == "SCALE": field_exists = True break if not field_exists: arcpy.AddError("SCALE field does not exist in the feature class.") else: # Update SCALE field for the newly added row with arcpy.da.UpdateCursor(feature_class_name, "SCALE") as cursor: for row in cursor: row[0] = current_scale cursor.updateRow(row) arcpy.AddMessage("SCALE field updated for the newly added record.") Hopefully this saves someone some time 🙂
... View more
05-16-2024
02:28 PM
|
0
|
0
|
572
|
POST
|
Hi Clayton, do you still need this solution? I think it exists now via smart editor.
... View more
04-04-2019
10:21 PM
|
2
|
0
|
3171
|
POST
|
I ended up downloading the latest WAB dev edition and hosting the new 'Group Filter Widget' as a custom widget and it works well in 10.5 version of portal without any issues.
... View more
03-31-2019
03:49 PM
|
1
|
0
|
2185
|
POST
|
I am having the same problem here. Has anyone raised this issue to tech support yet? Edit: BUG-000115177: The Reset button in the Group Filter widget in Porta.. Looks like this has been raised and 10.6.1 addresses the issue. Unfortunately for me, I have no control over portal versions within my organisation and this is going to drive me insane until they eventually upgrade to 10.6.1.
... View more
02-04-2019
03:24 PM
|
2
|
1
|
2185
|
IDEA
|
How is 2019 and this hasn't been implemented yet? It's core functionality that drives users up the wall.
... View more
01-21-2019
04:21 PM
|
3
|
1
|
769
|
IDEA
|
Hi MapSynch, I used your guide plus added some custom HTML....it kind of works by wrapping text. Here's the code: <table style="table-layout: fixed; width: 100%"> <tbody><tr> <td style="word-wrap: break-word"><b> HOLDER_OR_TRUSTEE: </b></td> <td style="word-wrap: break-word"> {HOLDER_OR_TRUSTEE} </td> </tr> </tbody></table> Problem: Fix: Hope this helps someone until they fix the auto sizing of popup boxes.
... View more
12-04-2018
06:08 PM
|
2
|
1
|
2102
|
POST
|
Hi Michael, Thank you for the very informative reply. I guess I'll probably wait it out for the new widget, especially if it's going to produce the same result. Can you possibly give me a very rough timeline on when that widget may be released? The whole basis for me asking the original question is that from what I've tried and read one cannot edit attributes in a feature service in a non-spatial way in WAB. Can anyone correct me if I'm wrong? Cheers Stuart
... View more
01-21-2016
02:54 PM
|
0
|
0
|
997
|
POST
|
Derek Law Hi Derek, Was there any particular reason why the option for Select by Query: 'Select features by querying for a value and update all that match the value' was not included in the WAB Batch Attribute Editor release, yet it was included in the ArcGIS Solutions Web AppBuilder Widgets (http://solutions.arcgis.com/shared/help/solutions-webappbuilder-widgets/get-started/configure-batch-attribute-editor/)? You wouldn't happen to know if its being considered for future releases of the widget? I know that this should be raised via the ideas channel if it's not coming but I thought I'd try on here. Being able to bulk change attributes via a selection is a major need for my clients using my web mapping application. Regards, Stuart Grey
... View more
01-19-2016
10:01 PM
|
0
|
2
|
997
|
POST
|
Hi Derek, Done! On a side note - thanks for being so accessible on here to provide information surrounding WAB, been a very big help. Regards, Stuart Grey
... View more
12-08-2015
04:46 PM
|
2
|
0
|
997
|