Select to view content in your preferred language

'Apply to each' failing with Survey 123 null repeats

166
2
4 weeks ago
DillonShea
New Contributor

Hello, I am pretty new to Power Automate integration with Survey123 results.

The idea is to have a conditional trigger to add a row in an online excel table for survey repeats that answer 'yes' to a 'select_one yes_no' entry. When setting the condition within an 'Apply to Each' box the submission fails if a repeat is not given a value or a 'null' entry. These are not required sections of the survey and so they are sometimes left blank.

Hopefully this is a simple fix, but I am not sure what needs to be done to allow the flow to continue to the next section without failing. No excel entry is needed when the repeat is has no data. 

Any guidance would be greatly appreciated!

Screenshot 2024-05-23 153349.jpg

2 Replies
DillonShea
New Contributor

For now, I seemed to have resolved this by selecting subsequent triggers to run whether the previous trigger succeeds or fails using the 'configure run after' options. If anyone has a more ideal way to handle this, I would love to hear.

0 Kudos
RobertAnderson3
MVP Regular Contributor

The way I end up handling this is by using a Conditon around the Apply_to_each and have it set to check if the repeat is null and then only run the Apply_to_each if it has a value in it.

RobertAnderson3_0-1716983633715.png

In mine the dynamic content shows feature repeats Vehicle, that gives me triggerOutputs()?['body/feature/repeats/vehicle_repeat'] when I hover over it after selecting it. Or it might show triggerBody()?['feature']?['repeats']?['vehicle_repeat'] when selected from dynamic content.

So with yours I assume it's just replace vehicle with Cabins.

0 Kudos