|
DOC
|
This document will walk you through how to hide a field in a pop-up using Arcade. You can use this to hide a field that contains a particular value, or if the field is blank/NULL. 1. Create an Attribute Expression for the field you wish to hide by clicking the 3-dot button next to the layer within the Web Map > Configure Pop-up JakeSkinner_0-1614078939695.png 2. Scroll down to Attribute Expressions and click Add: JakeSkinner_1-1614078992673.png 3. Specify an IIF statement for the field you wish to hide. For the trueValue, specify None. For the falseValue, specify inline. Here is an example: IIF($feature["Meter_Meter_Flow"] == -999 || IsEmpty($feature["Meter_Meter_Flow"]), "None", "inline") The above Arcade expression will hide the field Meter_Meter_Flow if the value is -999, or if the value is blank. 4. Under Pop-up Contents change the Display to A custom attribute display JakeSkinner_2-1614079359064.png 5. Click CONFIGURE 6. In the Custom Attribute Display dialog, add any fields you wish to show in the pop-up JakeSkinner_3-1614079493439.png 7. To hide a field, you will need to switch to View HTML Source. This will allow you to enter HTML code. JakeSkinner_4-1614079563194.png 8. Specify the following HTML to hide the field: <span style="display:{expression/expr0}">
<b>Meter Flow:</b> {Meter_Meter_Flow}<br />
</span> The expression/expr0 above is the id of the Attribute Expression previously configured: JakeSkinner_5-1614079987617.png {Meter_Meter_Flow} on the second line represents the name of the field. This value will display if the IIF statement returns False. Here is how the Custom Attribute Display appears: JakeSkinner_6-1614080132996.png 9. Click OK to close the Custom Attribute Display and OK again to close the Configure Pop-up panel If the Meter_Meter_Flow field is not blank, and is not -999 it will display: JakeSkinner_7-1614080343312.png If it is, it will be hidden: JakeSkinner_8-1614080383127.png
... View more
02-23-2021
03:42 AM
|
8
|
21
|
22687
|
|
POST
|
@JoshBillingsit looks like you are trying to authenticate with an Enterprise account, which won't work for this script. Looks like you have a client ID. If you have a client Secret as well, you could create a token. Ex: from arcgis import GIS
import requests, json
# Variables
username = '[email protected]_CoWS' # AGOL username
clientId = "PAtQ6cf8UNmLthcm" # AGOL App ID
clientSecret = "********" # AGOL App Secret
fc = r"C:\Projects\Data.gdb\CustomerData" # Path to Feature Class
fsItemId = "c0e41f90407043a2b4ae6b2761c496db" # Feature Service Item ID to update
# Generate Token
params = {
'client_id': clientId,
'client_secret': clientSecret,
'grant_type': "client_credentials",
}
request = requests.get('https://www.arcgis.com/sharing/oauth2/token', params=params)
response = request.json()
token = response["access_token"]
# Create GIS object
gis = GIS('https://www.arcgis.com', token=token, verify_cert=False)
... View more
02-22-2021
07:58 AM
|
1
|
0
|
7947
|
|
POST
|
@JoshBillingsmake sure your username is correct. It is case sensitive. Also, can you X out your password and send a screen shot of how you have the Variables section configured?
... View more
02-22-2021
07:26 AM
|
0
|
2
|
7953
|
|
POST
|
Hi @JoshBillings , Try the below script instead: https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using-truncate-and/ta-p/904457 A little easier to configure in my opinion.
... View more
02-10-2021
11:41 AM
|
2
|
7
|
8036
|
|
POST
|
@JayAppusamy, 1. ArcGIS Dashboard won't be able to access data from a database table unless it's published as a service. ArcGIS Insights does have the ability to connect directly to a Database. That may be an option you can explorer. https://doc.arcgis.com/en/insights/latest/get-started/create-a-database-connection.htm 2. If the REST Endpoint is added as an item to your Organization (i.e AGOL, ArcGIS Enteprise), or added to a web map, then it will be accessible in the Dashboard.
... View more
01-27-2021
06:24 AM
|
1
|
1
|
5807
|
|
POST
|
Hi @AndyBlackman2 , can you share the external URL?
... View more
01-26-2021
03:32 AM
|
0
|
1
|
2285
|
|
DOC
|
@MatthewWithumI haven't tested a PDF, but it should work the same as a JPG.
... View more
01-21-2021
05:59 AM
|
0
|
0
|
20203
|
|
POST
|
@LeviCecilyes, the database need to be registered with ArcGIS Server, and you need to publish the service as a referenced service. JakeSkinner_0-1611072703985.png
... View more
01-19-2021
08:12 AM
|
0
|
1
|
4720
|
|
POST
|
@LeviCecilinstead of overwriting the hosted feature service, you could run ArcGIS Pro's Delete Rows and Append tools on the feature service. These two tools could be executed in a model, or you could export the model to a python script and run the script as a scheduled task.
... View more
01-19-2021
06:25 AM
|
0
|
3
|
4846
|
|
POST
|
@inolaroch Try the following: import arcpy
import os, sys
from arcgis.gis import GIS
# Start setting variables
# Set the path to the project
prjPath = r"D:\Sample Data\SampleWorking\SampleWorking.aprx"
# Update the following variables to match
sd_fs_name = "ShereeTest"
portal = "https://www.arcgis.com/"
user = "enter_username"
password = "enter_password"
# Set sharing options
shrOrg = True
shrEveryone = True
shrGroups = ""
# End setting variables
print("Connecting to {}".format(portal))
gis = GIS(portal, user, password)
# Local paths to create temporary content
relPath = r"C:\GIVE_A_FILE_DIRECTORY"
sddraft = os.path.join(relPath, "WebUpdate.sddraft")
sd = os.path.join(relPath, "WebUpdate.sd")
#Create a new sddraft and stage to sd
print("Creating SD file...")
arcpy.env.overwriteOutput = True
prj = arcpy.mp.ArcGISProject(prjPath)
mp = prj.listMaps()[0]
lyrs = mp.listLayers()
for lyr in lyrs:
arcpy.mp.CreateWebLayerSDDraft(map_or_layers=mp,
out_sddraft=sddraft,
service_name=lyr.name,
server_type="HOSTING_SERVER",
service_type="FEATURE_ACCESS",
folder_name="SERVICES_OpenData",
overwrite_existing_service=True,
copy_data_to_server=True)
arcpy.StageService_server(in_service_definition_draft=sddraft,
out_service_definition=sd)
# Find the sd, update it, publish it with overwrite and set sharing and metadata
print("Search for original SD on portal...")
sdItem = gis.content.search("{} AND owner:{}".format(sd_fs_name, user), item_type="Service Definition")[0]
print("Found SD: {}, ID: {} n Uploading and Overwriting...".format(sdItem.title, sdItem.id))
sdItem.update(data=sd)
print("Overwriting existing feature service...")
fs = sdItem.publish(overwrite=True)
if shrOrg or sheEveryone or sheGroups:
print("Setting sharing options...")
fs.share(org=shrOrg, everyone=shrEveryone, groups=shrGroups)
print("Finished updating: {} - ID: {}".format(fs.title, fs.id))
... View more
01-07-2021
03:57 AM
|
0
|
3
|
4348
|
|
POST
|
@inolarochare you publishing the services to ArcGIS Online, or to ArcGIS Server and sharing to ArcGIS Online? Try adding the following to your script: sharing_draft.overwriteExistingService = True
... View more
01-07-2021
02:35 AM
|
0
|
5
|
4316
|
|
POST
|
Hi @inolaroch, are you looking to update the data within these services? If the schema has not changed, I would recommend using a truncate/append method. See the following document: https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using-truncate-and/ta-p/904457 This will allow you to maintain any pop-ups you may have configured in web maps.
... View more
01-07-2021
02:03 AM
|
0
|
7
|
4235
|
|
DOC
|
This document will walk you through how to create a custom print service developed by @TanuHoque that will print dynamic text from feature layers. Publishing the Print Service 1. Create a layout in ArcGIS Pro 2. Add your Map Frame and any other elements. Note: If there is only one map frame on the layout, it will be used to reference the web map by default. If there is more than one map frame on the layout, name the map frame to be used as WEBMAP_MAP_FRAME. 3. Add dynamic text by going to Insert > Dynamic Text. Scroll down to Table Attribute > Value Capture2.PNG 4. Select the Map Frame, the layer for Table, set Query to Visible Rows, and specify the Field that will display the dynamic text. Optionally, specify a Delimiter 3.PNG 5. Draw a rectangle in the layout where you would like the dynamic text to be placed 4.PNG 6. In the Element pane, click the Text View button 5.png 7. Change the field to all lower case 6.png 7.png 8. Once all the dynamic text has been added, remove the layer(s) used to create the dynamic text from the Map Frame Remove.png 9. After the layer(s) have been removed, go to Share tab > Layout File and export the .pagx to a folder 10. In the attached Dynamic Printing.tbx, open the Export Web Map tool. Specify the Format, choose the folder you exported the .pagx file to in step 9 for Layout Templates Folder, choose a Layout Template, and then Run the tool 9.png 11. In the DynamicPrintService.tbx, open the Get Layout Templates Info tool. Choose the folder you exported the .pagx file to in step 9 for Layout Templates Folder and then Run the tool 10.png 12. Click on the Analysis tab > History to open the History pane 11.png 13. Before proceeding make sure ArcGIS Pro is connected to your ArcGIS Enterprise organization. Right-click on the Export Web Map tool > Share As > Share Web Tool 12.png 14. Specify a Name for the print service. Under Data, choose the option Reference registered data. Optionally, specify a Portal Folder and share the service (i.e. to your Organization) 13.png 15. Click Configuration tab. For Execution Mode specify Synchronous and set the Message Level to Info 14.png 16. Click the Content tab. Click the Add Tool and select the Get Layout Templates Info tool 15.png 17. Analyze and Publish the service Using the Print Service The next section will walk you through how to configure the custom print service using ArcGIS Enterprise Web AppBuilder 1. Create a web map using a feature layer. If you are working with a Map Service, i.e. https://ags.esri.com/server/rest/services/ConnectionInfo/MapServer, be sure to add the layer to your web map as a feature layer. To do this, in the web map choose Add > Layer From Web > paste in the URL with the index value. Ex: https://ags.esri.com/server/rest/services/ConnectionInfo/MapServer/0 2. Save the Web Map 3. Create a Web Application using Web AppBuilder and choose the web map you just created that contains the feature layer 4. Add the Print widget to your Web Application 5. For the Service URL, specify the path to your print service including the GPServer/Export%20Web%Map. Ex: https://jake2.esri.com/arcgis/rest/services/Dynamic_Print_Service/GPServer/Export%20Web%20Map Optionally, specify a Default title, Default author, Default copyright, Default format, and Default Layout 16.png 6. The custom print service will print dynamic text for all visible features. If you want to limit the extent to a particular feature, you can add the Filter widget and filter based on a unique attribute. 7. Open the Print widget, choose the Layout and Format, and then click Print Print.PNG Here is an example of an output PDF created with the dynamic text on the left: 17.png
... View more
12-15-2020
04:55 PM
|
6
|
41
|
32692
|
|
DOC
|
@TimSolomonsonyou need to enable editing on the Feature Service. You can do this by going to the Settings.
... View more
12-08-2020
09:07 AM
|
0
|
0
|
20554
|
|
DOC
|
@DevinBoyle_PCMCit looks like it's failing on the truncate. Be sure you have the correct item id referenced in the variables. The below code should work if you are able to truncate the service: from arcgis.gis import GIS
# Variables
username = "jskinner_CountySandbox" # AGOL Username
password = "********" # AGOL Password
fsItemId = "c0e41f90407043a2b4ae6b2761c496db" # Feature Service Item ID to update
# Create GIS object
gis = GIS("https://www.arcgis.com", username, password)
# Truncate Feature Service
featureLayer= gis.content.get(fsItemId)
fLyr = featureLayer.layers[0]
fLyr.manager.truncate()
... View more
11-17-2020
04:29 PM
|
0
|
0
|
68616
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|