Announcements
I have a flow that is getting response details from a form. There are five education questions in the form, each with the option to upload one file. The flow also creates one list item for EACH education responses (using array/apply to each). If there are three education responses, the respondent has three list items created. I'd like to have the file uploads for each of the education questions attached to the associated list item. I can get the first one to work, but not multiple.
Response submitted
Get response details
Initialize variable - array - all education responses
Apply to each - use array
Condition - Current item is not equal to "blank"
Create item (list item in sharepoint for each education response)
Here is where I add the attachment:
Parse JSON - education upload file #1
Get file content using path (Onedrive) - point it to the onedrive folder
Add attachment
I tried adding parse JSON for each but it errored.
Thanks.
The separate list items for the education responses are working successfully, one line for each response. I want the uploaded files to go to the attachment column in the associated list item but I can only get the first one to work. I don't know how to get the other five to work (I'm quite new to automate). Here is what I'm looking for:
And what is the if condition there?
the list looks legit..so it should loop for 6 times..but if you say it is not may be that means the codition is failing for 5 items and successful only for one
Anil_g - thanks for assisting. Here is the screenshot of the education array:
Now, those values only the education responses, nothing to do with the file uploads. Maybe need to add the attachments here as well?
Can you show the array you initialized as I belive in the loop you are using the array only and if the array is wrong then the loop will not work..it would loop only once..
i get your requirement..basically for one response depending on number of different educational column values you want to create those many items..for the loop to work as said the array of educations column should be made proper..may be if the data is coming as single string we might need to split to make it an array
cheers
not sure if I'm explaining it well enough. In the screenshot below is a forms response from one respondent. This respondent had two education responses and each of those responses had a file upload. It created two list items (correctly) but the attachment is the same file for both (first response upload).
I've removed the "loop" because it wasn't working. I was asking how to make it work, would I have multiple Parse JSON or put them all into one? I need the uploaded file to be attached to the associated list item that is created.
is the loop working for the number of items?
because if you say you dont have error may be it is looping only once..check that
also small correction...you need not do get file content in loop as it is the same file..you can do it before loop and use the same content for all 3 items
Also instead of constructing and getting by path you can use get file content with id as well
cheers
I'm not getting an error, I just can't get any attachments after the first one.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.