Hi
I have set up a from that allows user a choice of what service they require from us. Do they want to retrieve records from our warehouse or do they want us to collect records to store for them. If they want us to collect records we ask them to attach a template to the form of the records we need to collect.
I have set up a flow where when a form is submitted the data populates a request List (set up in Microsoft Lists) and then there is an action to add the template. All seems to be working well and data is populating the list, however I am getting the above error message when staff select the retrieve option and don't have to attach a template to the request. Is there a way of making the flow just apply this action when collection is selected?
Error message
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@json(outputs('Get_response_details')?['body/r880f970ae6954f689189a39c62458eb7'])' is of type 'Null'. The result must be a valid array.
Thank you