[Updated July 2023: Added new note with link to a more recent and complete video]
Note: You may want to watch this video instead for a more recent take at this functionality
Just a few days a new Create Report action was added to the ArcGIS Survey123 connector for Microsoft Power Automate. While this action will not be officially documented or supported until the upcoming February 2023 release (currently planned for February 22), you can start playing with it now.
The video below will give you a quick tour to get you going. Enjoy!
If you have any feedback, please let us know by posting a comment below or adding your comments to the Survey123 Early Adopter Community website.
Note: Since this action was added to the connector, some of you have reported that any flow previously authored from a Microsoft Power Automate template, stops working when you edit it. To resolve this issue, the Survey123 connector needs to be deleted from your flow and added again. We are working to understand if this problem can be prevented or not.
This might not be your issue, but I'm hoping this might help others who are experiencing this error.
Based on my past experiences with this error, it was due to the fact that the report was not generated, resulting in that error since there was no report to upload. While Survey123 showed it passed and did not fail, it technically failed. Most often than not, it was due to a missing token due to my Survey123 connection expiring after 2 weeks (organization policy).
Check your Survey123 create report raw output to see if it says esriJobSucceeded. If it does not say that, then your report was not generated. See my screenshot where it shows it passed, but no report was created for it to upload.
I hope this helps out.
You appear to be incorrect in that a report was not created even though it showed no error. How do you correct the Survey123 connection expiring without recreating the entire flow?
The Survey123 token that's used for the Create report action times out every 14 days currently, have been pushing Esri to update this but they have to work with Microsoft so it's a slow process (they have recently updated the ArcGIS Online connection to remove this limitation)
To refresh your connection, click Connections on the side of the screen, then find the Survey123 one and click Switch Account and then just sign in again with the same credentials. And set a reminder to do this every 13 days until Esri improves this.
Is there a way to pick a report template based on an attribute? I currently have three different flows, one for each template, but I would like to combine into one flow. I'm looking for guidance on how to tell power automate to use template 1 if attribute x equals 1. Use template 2 if attribute x equals 2, etc. I've tried using conditional statements but the flow is only successful for the first statement.
I've done something similar where I populate a different excel file on sharepoint based on a specific value of an attribute, using multiple conditional statements which are setup parallel to each other. Try adding a dummy Compose as the very first step after the Yes condition, and do nothing after the No. See the following for more details on the dummy compose:
Solved: Add Parallel Branch After Condition - Power Platform Community (microsoft.com)
Hi @Stephanie1
There is more than one way to accomplish what you want, but if you want to do so using an expression in the report template field, here is one way based on your example above:
if(equals(triggerBody()?['feature']?['attributes']?['x'], '1'), '2b5b3e02f2de43b6b5026f07a5021fe9', '2e0d45fe4ed241a3894c452b0f648933')
It goes without saying but ensure you replace the template IDs with your own.
I have used one where it chose between 4 different templates based on two different attributes. See below.
if(and(equals(triggerBody()?['feature']?['attributes']?['form'], 'tg'), equals(triggerBody()?['feature']?['attributes']?['rvra'], 'no')), '2b5b3e02f2de43b6b5026f07a5021fe9', if(and(equals(triggerBody()?['feature']?['attributes']?['form'], 'tg'), equals(triggerBody()?['feature']?['attributes']?['rvra'], 'yes')), '524bce6140394447a271cf2246617772', if(and(equals(triggerBody()?['feature']?['attributes']?['form'], 'mp'), equals(triggerBody()?['feature']?['attributes']?['rvra'], 'no')), 'b5b664adb80243658bbbc9545c0f04d0', '2e0d45fe4ed241a3894c452b0f648933')))
I hope this helps.