Hi. I am using the attachment column from a Sharepoint list into my PowerApp. When testing the app, I take/add multiple photos to the attachment section. However, when I do this every photo is named "image" and when I submit the form, the Sharepoint list will only show me one out of three that I uploaded because all three have the same name. How can I get my live photo upload file names to build off each other? For instance, "image" "image1" "image2" etc... I would prefer if the user does not have to manually do this, if I could code something somewhere to where it can name the different photos based on upload time that would be great. Thanks!
Solved! Go to Solution.
Hi @kbailey ,
Do you want to add multiple photos taken from your phone via Flow to the Attachments column in SharePoint List? I have made a test for your reference.
1. Here is my Flow.
2. Add a Camera Control to the Form and apply the following formula on its OnSelect property as:
Collect(colimages,{PhotoName:Text(Now(),LongDateTime)&".jpg",PhotoValue:Substitute(Last(Split(JSON(Camera1.Photo,JSONFormat.IncludeBinaryData),"base64,")).Result,"""","")});
3. Select the Form and apply the following formula on its OnSuccess property as:
Set(itemid,Form2.LastSubmit.ID);
ForAll(colimages,CameratoSP.Run(itemid,PhotoName,PhotoValue))
Result Screenshot:
Best Regards,
Charlie Choi
HI @kbailey ,
Attachments controls uploads should use the current file name of the item selected. How are you uploading them?
I am taking a photo and clicking "use photo" and if I take multiple photos it labels my uploads all under the name "image"
@kbailey ,
Is this on a mobile device ? If so I am not aware of any solution as the naming is in the control of the device.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @kbailey ,
Do you want to add multiple photos taken from your phone via Flow to the Attachments column in SharePoint List? I have made a test for your reference.
1. Here is my Flow.
2. Add a Camera Control to the Form and apply the following formula on its OnSelect property as:
Collect(colimages,{PhotoName:Text(Now(),LongDateTime)&".jpg",PhotoValue:Substitute(Last(Split(JSON(Camera1.Photo,JSONFormat.IncludeBinaryData),"base64,")).Result,"""","")});
3. Select the Form and apply the following formula on its OnSuccess property as:
Set(itemid,Form2.LastSubmit.ID);
ForAll(colimages,CameratoSP.Run(itemid,PhotoName,PhotoValue))
Result Screenshot:
Best Regards,
Charlie Choi
User | Count |
---|---|
119 | |
86 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
140 | |
109 | |
83 |