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.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.