Select to view content in your preferred language

Power Automate Flow Triggers Before Attribute Rules?

142
1
08-15-2024 07:50 AM
ZachBodenner
MVP Regular Contributor

Hello,

I'm working on a Power Automate flow that sends an email when a Survey123 Response is submitted. The Survey123 form is based on a feature service referenced to my enterprise geodatabase. The feature class in the egdb has an attribute rule that will assign an ID upon insert. The attribute rule is confirmed working, as is the survey response and the flow that watches it. The email return is supposed to include the ID dynamically from the inputs to the flow. However, I've tested it a few times and while other attributes (filled out by the submitter in S123) come through dynamically as expected, the ID generated as an attribute rule does not, there's just empty space where the value should be. 

Is it expected behavior that the Power Automate flow will trigger before a database attribute rule? Is there a way around that, such as introducing some kind of delay?

0 Kudos
1 Reply
RobertAnderson3
MVP Regular Contributor

That would be the expected behaviour I believe.

The "When a survey response is submitted" trigger originates from the app on the device when the submission is sent as far as I have been able to understand it. If you look at the trigger outputs on a successful run, it should show you the attributes from the survey and the ID field will likely be blank.

I have run into this issue and tried narrowing it down because occassionally flows I have with Survey123 as the trigger just don't run, Automate just never sees that submission despite the data getting to the feature layer.

I think the way you would need to do this is using the ArcGIS Connector instead, using the When a feature is created as the trigger makes the most sense to me, then one of the Get Data actions to retrieve it from the feature layer.

I am unfamiliar with how attribute rules on inserts work so I don't know if it counts it as part of the insert of a new record or if it updates the record immediately after creation, that could impact what you need in the flow to retrieve the data for the email.

0 Kudos