Hi @LeeButler1
You can use the python script below to achieve this. You will need to fill in the feature service id, the layer name, and the field name you want to change the displayField to.
from arcgis.gis import GIS
## connect to AGOL
agol = GIS("home")
## the item id for the feature service to update
item_id = "FEATURE_SERVICE_ID"
## access the feature service
item = agol.content.get(item_id)
## the name of the layer within the feature service
lyr_name = "Layer_Name"
## the field name you want to use as the display field
field_name = "Field_Name"
## access the layer
lyr = [lyr for lyr in item.layers if lyr.properties.name == lyr_name][0]
## use this dictionary to update
update_dict = {
"displayField" : field_name
}
## update the layer definition
print(lyr.manager.update_definition(update_dict))
~ learn.finaldraftmapping.com