
Announcements
I have attached my images on SharePoint List in Image & attachment field both. Now i want to attach those images in email by powerapps by looking up the ID.
I am using below code but it is not working, however it is showing in my Gallery3 on Image7.
Snapshot of error is below given
Here is my code.
ClearCollect(ImageCollection,ForAll(Gallery3.AllItems,{Name: "Name.jpg", ContentBytes: Image7.Image,'@odata.type': ""}));
ClearCollect(SessionInfo,{i:1,Value:TextInput1.Text},{i:2,Value:SenderID});
ForAll(SessionInfo,Patch(AppSettings,LookUp(AppSettings,Name="HTMLTemplate"),{Value:Replace(LookUp(AppSettings,Name = "HTMLTemplate").Value,Find("{" & SessionInfo[@i] & "}",LookUp(AppSettings,Name= "HTMLTemplate").Value),Len("{"&SessionInfo[@i]&"}"),SessionInfo[@Value])}));
Office365Outlook.SendEmail("rbautomationteam@RBcom.onmicrosoft.com","#THANKYOUBOARD_HRSS",LookUp(
AppSettings, Name = "HTMLTemplate").Value,{Attachments:ImageCollection , IsHtml:true});
Hi @VDS_Mantra ,
What is the Image property of Image7 Control? Could you please share the sample data in ImageCollection?
I just want to confirm what kind of data stored in ContentBytes column.
Please make sure the gallery displays images from attachment field and the image property of Image7 control is ThisItem.Value, rather than ThisItem.AbsoluteUri , because ThisItem.Value output the binary of the files, but the ThisItem.AbsoluteUri only returns the link for the file.
Hope this helps
Sik