Survey 123 - Related records through Power Automate

426
1
05-30-2022 02:10 AM
IDDSAdmin
New Contributor

Dear all,

I was hoping someone with some more Power Automate knowledge could help me with the following issue.

I am using the Survey123 connector to send an automatic email once a Survey123 form is submitted. I can retrieve the attributes from the survey without any issue. 

Now, the survey results are stored in a table, which is related to a hosted feature service through a relationship class. I would like to retrieve some of the attributes of this hosted feature service in order to populate the automatic email. In the dynamic content, I did find the following:

@{triggerBody()?['feature']?['layerInfo']?['relationships']}

However, I cannot figure out how to retrieve the hosted feature service in question and retrieve the right attributes. Whenever I include above dynamic content, my email action changes into a "Apply to each" loop but I am unsure where to proceed from there.

If anyone could point me in the right direction, this would be greatly appreciated. Maybe I am just missing something obvious but my Power Automate experience is somewhate limited so this has become a real headscratcher for me. Thanks in advance!

 

 

1 Reply
abureaux
MVP Regular Contributor

This is not something I have tried yet, but I can at least try pointing you in the right direction.

So, the S123 response will only have the data from the survey. The data in the related table is not accessible at this point. Assuming S123 has the key data contained within it to pull from the related table (e.g., table name, location, and some kind of primary key), you may be able to pull out the extra data with some additional steps.

Your best bet looks to be the ArcGIS step and Get data from feature layer:

abureaux_0-1654189213756.png

You may need to involve something like FME to get the functionality you are looking for, but I'd at least look into this first.

0 Kudos