Jan 29 2022 10:57 PM
Hello
I got a SharePoint list (List A) where I run a "For a selected Item" event that collects text and a file (attachment) that I then use to populate a different list (List B).
I can use the text to populate List B through "Create Item", but I haven't been able to "Add attachment". I've looked for the answer, but I haven't understood how to reference the file content and the file name to use "Add attachment".
The "For a selected Item" gives the outputs as shown below: "Testing flow", and ContentBytes and Name for the file, but I can't use them to "Add attachment". I will very much appreciate your help.
Leo
Jan 30 2022 06:09 PM
Hi @Leonel GUZMAN please refer the image and the steps below
Please try it out and let me know if you have any clarifications.
Jan 30 2022 06:47 PM - edited Jan 30 2022 06:51 PM
Thank you very much @Sudharsan K
The challenge I have is that List A doesn't have the attachment I need in List B. The only thing I get from List A is the ID, so that I can relate items in List B (Primary and Foreign Keys).
In the "For a selected Item" action, I ask the user to give me new information: an Update (text), and an attachment (file).
I then create variables to use a) the text I get for the update, and b) the ID from List A, that I also use as a reference in List B. I haven't been able to use the input I get for file (Attachment (optional)).
If I understand the use of "Get attachments" correctly, that action helps me get attachments from a list. However, I'm not trying to use attachments from the list, but the brand new file the user gives me through "For a selected item". This is the screen the user gets to provide the new input. The file in that new input is the challenge. I haven't understood how to use it and save it in List B.
Thank you for your help.
Sep 21 2022 03:58 AM
@Leonel GUZMAN did you get an answer, I have exact same issue.
Sep 21 2022 04:51 AM
Unfortunately not. I didn't I dropped the project.
I hope you have better luck.
lg
Sep 25 2022 05:48 PM
@Leonel GUZMAN sorry to hear you had to drop the project.
Not a good omen for me thinking of having Microsoft being able to actually solve any issue that their end users face. Its just so draining working on Microsoft products!!
Dec 20 2022 05:53 AM
@alirananavitascom, @Leonel GUZMAN,
Please find below the solution I tried :
I was not able to recover the filename with the flow, so I used this expression to get it from the attachement I uploaded manually :
string(triggerbody()?['file']?['name'])
It allows me to get the filename and store it in my SharePoint list.
Please let me know if it's ok for you.
Jan 15 2023 08:44 AM - edited Jan 15 2023 08:44 AM