Power Automate: Create a new record in feature layer

644
3
01-25-2024 10:50 AM
AnninaRupe1
New Contributor III

All, 

I am using Power Automate to help automate a portion of a project's workflow. Unfortunately, I'm running into issues and my Flow is failing. 

Here's the goal: user updates an attribute in an ArcOnline hosted feature layer. When that attribute is changed to a certain value, we need that feature (polygon and some attributes) to be copied to another hosted feature layer.

I've attached screenshots of my current Flow, but am having issues with getting the polygon to be copied. I can get the attributes copied: what happens is a attributed record is created but there is no geometry associated with it. I think it all has to do with the "Geometry" attribute in the "Create a record in a feature layer," but I can't figure out what to put there. I've tried all kinds of combinations. What am I doing wrong? Just a note, too: I haven't added the condition portion of the Flow yet that identifies the attribute and value that should trigger the copying of the record (I want to get the geometry copying portion to work first!).

@SeanKMcGinnis 

@AnthonyLatini 

Tags (1)
3 Replies
AnninaRupe1
New Contributor III

Following up on this with an update:

I found some documentation about the Geometry attribute and found out to find this attribute you have to type in "geometry" in the search bar in the Dynamic content window. After trial and error, I found a flow that partially worked: using the trigger "When a record is updated in a feature layer," run the "Get data from feature layer action." After that, run the "Fetch updates, changes, or deletions from feature layer" action and then run the "Create a record in a feature layer" action. The geometry gets written to the feature layer however it creates a polygon for each record in the original feature layer (not just the updated one) and the attributes are incorrect (the attribute is populated with the same value across each record, even those that are different). I have gotten just one record to be written (with the correct attribute) but in that flow there is no geometry associated with the record.

0 Kudos
VivianPham
New Contributor

I'm also having trouble with this particular flow with the "Geometry" attribute in the "Create a record in a feature layer". 

I've tried various methods, and the one above by AnninaRupe1 just isn't suited for me as I'm trying to create a record in a feature layer when a Sharepoint List Item is created. A quick chatgpt indicates trying this, but obviously no luck.


"x": <longitude_value>,
"y": <latitude_value>,
"spatialReference": {
"wkid": 4326



0 Kudos
AnninaRupe1
New Contributor III

@VivianPham, I think there may be some type of bug going on here. I found another post from a user that was having similar issues. The Fed UC is this week so it's likely Esri employees are pretty busy and haven't had time to respond. Hopefully something can get figured out!

0 Kudos