Maybe you should try,expression = !field! + ", " + str(parameter)
Hi, I am trying to concatonate an existing field with a parameter in a python scriptparameter = 4expression = !field! + ", " + parameterarcpy.management.CalculateField("testshp", "field", expression, "PYTHON")my field is a text field with a value of "1, 2, 3" and i want to make it "1, 2, 3, 4" where everytime the script runs and the user inputs a number it adds a comma, a space, then the parameter. I keep running into issues with combining a string and an int but the parameter is preset to string. Any ideas? Thanks.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.