Hello, I am looking to have any attachment that is added in FORMS to move over to SharePoint, I already have the form set and the flow was working and works at times but sometimes it fails. Not sure what the issue is can someone please advise, thank you.
Error message
The execution of template action 'Apply_to_each_attachment' failed: the result of the evaluation of 'foreach' expression '@json(outputs('Get_response_details')?['body/r155b0f7dbb6746efbed08000575884de'])' is of type 'Null'. The result must be a valid array.
Ok it let me input it but it is failing only when I have no attachment
Hi,
It works for me:
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
What am I doing wrong here?
Please use the below expression:
if(empty(outputs('Get_response_details')?['body/r155b0f7dbb6746efbed08000575884de']),json('[]'),json(outputs('Get_response_details')?['body/r155b0f7dbb6746efbed08000575884de']))
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
if(empty(outputs('Get_response_details')?['body/r155b0f7dbb6746efbed08000575884de']),[],json(outputs('Get_response_details')?['body/r155b0f7dbb6746efbed08000575884de']))
This is what I have I tried to type each but its not working or pasting
Pls share the output of get response action from the failed flow instance. I am interested in knowing the values for attachment field in form. You can share the JSON with sample data.
I'm getting "THE EXPRESSION IS INVALID" I used your example and updated the field ID, made sure there were no spaces ect.
I'm getting "THE EXPRESSION IS INVALID" I used your example and updated the field ID, made sure there were no spaces ect.