Select to view content in your preferred language

Dealing with multiple Unique ID

212
2
04-21-2024 03:10 PM
DominicRoberge2
Occasional Contributor III

Hello,

I have a basic flow , that once a records is added/updated  in Dataverse, we update a record in ArcGIS Online. Pretty straightforward. However, sometimes, we have more than one polygons with the same UNIQUEID (if we would merge the polygons that would solve the problem, but at this time it's not an option).

So my flow return the following message:

    "body": {
        "message": "More than one item with the ID field LandRecordsID = 55c5276d-58fe-ee11-a1fe-7c1e520c4eae was found. Please ensure that the ID used is unique and try again.",
        "success": false
    }
 
DominicRoberge2_0-1713737236441.png

 

this is what my flow looks like right now:

DominicRoberge2_1-1713737379109.png

 

So, I am seeking an advice on how I could use the flow to update these 3 polygons with the same record from Dataverse.

 

 Thank you!

 

D

 
0 Kudos
2 Replies
ChrisUnderwood
Esri Contributor

Hello @DominicRoberge2 , the phrases "multiple" and "Unique ID" are clearly a contradiction in terms.

If the non-unique IDs are coming from separate systems that are unknown to each other, then you could use an Esri Global ID (aka UUID in other systems), to avoid a risk of clashing ID values.

Some details of this are discussed here.

https://community.esri.com/t5/arcgis-pro-questions/how-are-global-id-numbers-created/td-p/1053622

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-global-ids.htm

 

0 Kudos
DominicRoberge2
Occasional Contributor III

I solved my problem: 

If my GIS data has a 1-1 relationship with Dataverse, everything update as expected.

If I have multiple GIS records with the Dataverse unique ID, the process will fail. So I added a condition to bypass that.

DominicRoberge2_0-1713983772141.pngDominicRoberge2_1-1713983781657.png

if it fails, I create a JSON recordset using the Get Data from FeatureLayer

DominicRoberge2_2-1713983796654.png

I then loop through each records and update the feature layer based on the GlobalID returned by my JSON object and update each fields from the Dataverse recorset.

DominicRoberge2_3-1713983822134.png

I love Power Automate 😁

0 Kudos