<?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: Publishing of a GP Tool is changing my string queries in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1417710#M39384</link>
    <description>&lt;P&gt;Yup; same issue. ESRI making arbitrary changes to scripts to try and make them "server safe" while actually breaking things is a horrible strategy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a "Idea" posted about this; take a look...&amp;nbsp;&lt;A title="Improved GP Tool Publishing" href="https://community.esri.com/t5/arcgis-pro-ideas/improved-gp-tool-publishing-approve-changes-to/idi-p/1410497" target="_blank" rel="noopener"&gt;Improved GP Tool Publishing - Approve Changes to scripts before publish&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 18:35:54 GMT</pubDate>
    <dc:creator>DEWright_CA</dc:creator>
    <dc:date>2024-05-01T18:35:54Z</dc:date>
    <item>
      <title>Publishing of a GP Tool is changing my string queries</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1237332#M34712</link>
      <description>&lt;P&gt;When you publish a script GP tool it tries to "fix" the paths for me.&amp;nbsp; I get that part.&amp;nbsp; But it is also changing my query strings and I cannot figure out why or how to stop it.&lt;/P&gt;&lt;P&gt;I have tried all 3 of these ways&lt;/P&gt;&lt;P&gt;exp="PrimaryKey IN(" + terrapkString +" )")&lt;BR /&gt;exp = f'PrimaryKey IN({terrapkString})'&lt;BR /&gt;exp = "PrimaryKey IN({})".format(terrapkString)&lt;BR /&gt;arcpy.Append_management(tablePath, os.path.join(outGDB, table), expression=exp)&lt;/P&gt;&lt;P&gt;But the server keeps doing something like this.&amp;nbsp; Changing it in two places&lt;/P&gt;&lt;P&gt;terrapkString = terrapkString + g_ESRI_variable_5 + pk + "',"&lt;/P&gt;&lt;P&gt;g_ESRI_variable_5 = "'"&lt;BR /&gt;g_ESRI_variable_6 = 'PrimaryKey IN({})'&lt;BR /&gt;g_ESRI_variable_7 = 'PrimaryKey IN('&lt;BR /&gt;g_ESRI_variable_8 = ' )'&lt;/P&gt;&lt;P&gt;exp = g_ESRI_variable_6.format(terrapkString)&lt;/P&gt;&lt;P&gt;I am out of options to try now I think.&amp;nbsp; What is tripping it up here?&amp;nbsp; It still works but I want to know which format it would like.&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 17:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1237332#M34712</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-12-02T17:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing of a GP Tool is changing my string queries</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1417694#M39383</link>
      <description>&lt;P&gt;Here I am, two years later with the same issue. If anybody has a hunch, please let me know!&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 18:13:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1417694#M39383</guid>
      <dc:creator>Declan</dc:creator>
      <dc:date>2024-05-01T18:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing of a GP Tool is changing my string queries</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1417710#M39384</link>
      <description>&lt;P&gt;Yup; same issue. ESRI making arbitrary changes to scripts to try and make them "server safe" while actually breaking things is a horrible strategy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a "Idea" posted about this; take a look...&amp;nbsp;&lt;A title="Improved GP Tool Publishing" href="https://community.esri.com/t5/arcgis-pro-ideas/improved-gp-tool-publishing-approve-changes-to/idi-p/1410497" target="_blank" rel="noopener"&gt;Improved GP Tool Publishing - Approve Changes to scripts before publish&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 18:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/publishing-of-a-gp-tool-is-changing-my-string/m-p/1417710#M39384</guid>
      <dc:creator>DEWright_CA</dc:creator>
      <dc:date>2024-05-01T18:35:54Z</dc:date>
    </item>
  </channel>
</rss>

