<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558356#M90110</link>
    <description>&lt;P&gt;So basically like I have the tags parameter currently formatted.&amp;nbsp; Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/575841"&gt;@Jamie_Leitch_CNF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2024 22:03:10 GMT</pubDate>
    <dc:creator>DavidColey</dc:creator>
    <dc:date>2024-11-13T22:03:10Z</dc:date>
    <item>
      <title>Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558122#M90089</link>
      <description>&lt;P&gt;I just upgraded my desktop machine to ArcGIS Pro 3.4 from 3.3.x, and noticed a change to the&amp;nbsp;FeatureSharingDraft class tags property.&amp;nbsp; After updating my cloned python environment, I was getting an error in one of my python scripts on the last line in this snippet:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sharing_draft = mp.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", sd_fs_name)
sharing_draft.summary = "my summary"
sharing_draft.tags = ["tag1", "tag2"]
sharing_draft.exportToSDDraft(sddraft)&lt;/LI-CODE&gt;&lt;P&gt;The error was:&amp;nbsp;Error exporting SD Draft: 'list' object has no attribute '_validateParameters'&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When Pro 3.3.x was installed this error did not occur.&amp;nbsp; Turns out it was the tags property - it cannot be a list, it must be a string with tags separated by a comma or semi-colon.&amp;nbsp; Its strange that this property was always specified in the documentation to be a string, but I was using a list without error.&lt;/P&gt;&lt;P&gt;Just posting this in case anyone else has a similar issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 16:56:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558122#M90089</guid>
      <dc:creator>Jamie_Leitch_CNF</dc:creator>
      <dc:date>2024-11-13T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558304#M90107</link>
      <description>&lt;P&gt;Definitely thank you for this&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/575841"&gt;@Jamie_Leitch_CNF&lt;/a&gt;&amp;nbsp; - I've been using this method since 1.x (or ever since they created the arcpy sharing module) to create sddrafts, stage the sd file, and upload same in order to keep our weekly Enterprise hosted feature layers current....&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 20:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558304#M90107</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2024-11-13T20:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558311#M90108</link>
      <description>&lt;P&gt;Here's how I've always done this in the Python IDLE if it helps anyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Import system modules
import sys, os, arcpy, time, smtplib
from arcpy import env
from datetime import timedelta

# Local variables...
message = ""
current_time = time.asctime()
starting_time = time.time()
arcpy.SetLogHistory(False)
env.configKeyword= "DEFAULTS"
env.overwriteOutput = True

def stageSDDraft(mp,lyrName,summary,lyrs,descript,folder,tags,sdfolder):
    sddraft_out = "C:/ArcProProjects3x/PortalUpdates/" + sdfolder + "/" + lyrName + ".sddraft"
    draft = mp.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", lyrName, lyrs)
    draft.portalFolder = folder
    draft.tags = tags
    ##draft.allowExporting = True
    draft.summary = summary
    draft.description = descript
    draft.overwriteExistingService = True
    draft.exportToSDDraft(sddraft_out)
    return

try:
    portal = arcpy.SignInToPortal("https://webserver.ourorg.net/portal", "myUserName", "MyPassword")
    aprx = arcpy.mp.ArcGISProject('C:/ArcProProjects3x/PortalUpdates/PortalUpdates.aprx')
    for m in aprx.listMaps("Trans Layers"):
        print("Map: " + m.name)
        for lyr in m.listLayers():                            
            if lyr.name == 'Thoroughfare':
                lyrList = []
                lyrList.append(m.listLayers(lyr.name)[0])
                print(lyr.name)
                stageSDDraft(m, lyr.name, "The Thoroughfare layer contains existing and planned roadways for Sarasota County, supporting a variety of transportation, evacuation and transportation planning efforts.",lyrList,
                             "The Thoroughfare layer contains existing and planned roadways for Sarasota County, supporting a variety of transportation, evacuation and transportation planning efforts",
                             "TransportationLayers","Transportation,Planning,Services,Safety","Transportation")
                print(lyr.name + " Draft Created")
                arcpy.StageService_server('C:/ArcProProjects3x/PortalUpdates/Transportation/' + lyr.name + '.sddraft', 'C:/ArcProProjects3x/PortalUpdates/Transportation/' + lyr.name + '.sd')
                print(lyr.name + " Service Staged")
                arcpy.UploadServiceDefinition_server('C:/ArcProProjects3x/PortalUpdates/Transportation/' + lyr.name + '.sd', 'My Hosted Services', "","","","","","OVERRIDE_DEFINITION","SHARE_ONLINE","PUBLIC",
                                                     "SHARE_ORGANIZATION","Transportation Layers Group")
                print(lyr.name + " Service Uploaded")
                message = message + "\n" + "1. " + (lyr.name) + " Service Uploaded"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it looks like I am going to have to adjust my tags string here in the stageSDDraft:&lt;/P&gt;&lt;P&gt;"Transportation,Planning,Services,Safety"&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;"Transportation", "Planning", "Services", "Safety"&amp;nbsp;&lt;/P&gt;&lt;P&gt;or to&lt;/P&gt;&lt;P&gt;["Transportation", "Planning", "Services", "Safety"]&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/575841"&gt;@Jamie_Leitch_CNF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 21:15:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558311#M90108</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2024-11-13T21:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558346#M90109</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10568"&gt;@DavidColey&lt;/a&gt;&amp;nbsp;actually, this:&amp;nbsp;&lt;SPAN&gt;["Transportation", "Planning", "Services", "Safety"] would fail.&amp;nbsp; It should be:&lt;BR /&gt;"Transportation,Planning,Services,Safety"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 21:41:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558346#M90109</guid>
      <dc:creator>Jamie_Leitch_CNF</dc:creator>
      <dc:date>2024-11-13T21:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558356#M90110</link>
      <description>&lt;P&gt;So basically like I have the tags parameter currently formatted.&amp;nbsp; Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/575841"&gt;@Jamie_Leitch_CNF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 22:03:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1558356#M90110</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2024-11-13T22:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1561514#M90451</link>
      <description>&lt;P&gt;So you may find this interesting&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/575841"&gt;@Jamie_Leitch_CNF&lt;/a&gt;&amp;nbsp; - when I tried to overwrite my layer like I detailed above, the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                arcpy.UploadServiceDefinition_server('C:/ArcProProjects3x/PortalUpdates/Transportation/' + lyr.name + '.sd', 'My Hosted Services', "","","","","","OVERRIDE_DEFINITION","SHARE_ONLINE","PUBLIC",
                                                     "SHARE_ORGANIZATION","Transportation Layers Group")&lt;/PRE&gt;&lt;P&gt;failed with five 9's - 99999 something unexpected....&lt;/P&gt;&lt;P&gt;Turns out that where I am specifying the group to be shared with, "Transportation Layers Group" in my case&amp;nbsp; I now need to specify it as a list:&lt;/P&gt;&lt;P&gt;["Transportation Layers Group" ]&lt;/P&gt;&lt;P&gt;Once I did that, the Upload Service Definition method works&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 22:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1561514#M90451</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2024-11-21T22:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Change to FeatureSharingDraft tags property after upgrade ArcGIS Pro to 3.4</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1587880#M93268</link>
      <description>&lt;P&gt;This actually breaks backwards compatibility, because tags are listed in an array in the item JSON, so when migrating items with arcpy, it will fail.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 09:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/change-to-featuresharingdraft-tags-property-after/m-p/1587880#M93268</guid>
      <dc:creator>calin_gi</dc:creator>
      <dc:date>2025-02-21T09:44:05Z</dc:date>
    </item>
  </channel>
</rss>

