When I run my script in the Python window in ArcGIS Pro 2.3.2 all changes are made in the version specified. When I run the same script as a geoprocessing tool all changes are made to DEFAULT. Is it possible to create a geoprocessing tool that changes the version and edits within that version?
<SPAN class="keyword token">import</SPAN> arcpy
<SPAN class="keyword token">import</SPAN> glob
workOrder <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>GetParameterAsText<SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Create version</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>CreateVersion_management<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"C:/Users/azumwalt.UECOOP/AppData/Roaming/ESRI/Desktop10.4/ArcCatalog/ElectricModel - azumwalt.sde"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"DEFAULT"</SPAN><SPAN class="punctuation token">,</SPAN> workOrder<SPAN class="operator token">+</SPAN><SPAN class="string token">"_TEST"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"PUBLIC"</SPAN><SPAN class="punctuation token">)</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>ChangeVersion_management<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Consumer_SQL02"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'TRANSACTIONAL'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"DBO."</SPAN><SPAN class="operator token">+</SPAN>workOrder<SPAN class="operator token">+</SPAN><SPAN class="string token">"_TEST"</SPAN><SPAN class="punctuation token">,</SPAN> None<SPAN class="punctuation token">)</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>