In Microsoft Power Automate, does anyone know of a way to compare the original attribute value to the current attribute value when a "Fetch updates, changes, or deletions from feature layer" is used with a "When a record is updated in a Feature Layer" trigger?
It looks like the fieldsToCompare parameter for extractChanges is what I need but I cannot find a way to set that parameter in Power Automate. It also appears that supportsFieldsToCompare is set to false for all my hosted feature services that have Change Tracking enabled.
I would like users to get emails when the status of a reported issue has changed. Currently, I am sending different emails based on the current status, but the emails also trigger when staff enters notes on the reported issue even though the status has not changed.
Solved! Go to Solution.
@Joshua-Young We currently don't support `fieldsToCompare` in Fetch updates changes and deletions action but you can use layer queries which might not exactly solve the problem you have but you can only get the changes that matches the filter.
There is always an option to use Http Request built in action instead of fetch to send the parameters you need.
We do have this enhancement in our backlog.
@Joshua-Young We currently don't support `fieldsToCompare` in Fetch updates changes and deletions action but you can use layer queries which might not exactly solve the problem you have but you can only get the changes that matches the filter.
There is always an option to use Http Request built in action instead of fetch to send the parameters you need.
We do have this enhancement in our backlog.
@AkshayHarshe thank you for the information. I tried using the "When a HTTP request is received" trigger only to find out that our instance of ArcGIS Enterprise 11.5 is hard coding all hosted feature services supportsFieldsToCompare property to false with no option to change it. So any extractChanges calls with the fieldsToCompare property fail.
Is editor tracking disabled on your feature layer? Also, I not certain but it might be disabled if you have a FS referencing data from enterprise geodatabase.
Editor tracking is enabled and there is no enterprise geodatabase involved with this hosted feature service. I have a support ticket open with Esri Support and they have been able to replicate that hosted feature services properly configured have the supportsFieldsToCompare set to false in at least ArcGIS Enterprise 11.4, 11.5, and 12.0. I recreated the data in an enterprise geodatabase and that got the supportsFieldsToCompare to be true, but now other extractChangesCapabilities are set to false and Extract Changes fails with an error "The field 'layers' is required" even though the URL has layers=0 set.
If support or I can figure out a way to get this to work, I will post it here.
Assuming that the change is already made by the time the automation is triggered (would make sense).
In this case, I would use an intermediary database with limited information. E.g., ObjectID and Status. Use Power Automate to grab the recently edited item, then compare to the secondary database to see when the Status changes, and subsequently update the Status for that item.
While a little more work, this should work well.