I'm using a ArcGIS Pro-document which contains about 25 layers as a template for several customers (different customers, same map-structure). I usually take a copy of the template and manually change the datasource for each layer, so it corresponds to the users database and featureclass. I'm trying to do this automatically to save some time. The customers databases contains the same featureclasses, and the only difference is user and database-name. I've tried using the updateConnectionProperties-function in arcpy, but it doesn't work. The code runs without any errors, but none of the datasources changes. I guess it's because the dataset-name changes depending on the customer, like this:
Customer 1 - Dataset: Muncipality0305.DBO.WaterPipe
Customer 2 - Dataset: Muncipality1206.DBO.WaterPipe
MuncipalityXXXX is defined by the databasename.
Does anyone have any suggestions to how I can do this?