cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pityman
Helper III
Helper III

Send image from a collection

Hi,

i have a collection shore the image 

pityman_2-1615772260663.png

In the image 

pityman_3-1615772336238.png



Now the question is how can i send out the image from this collection to email?

Thankss!

 



 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @pityman ,

 

Please try to delete </img .

v-xiaochen-msft_0-1615946339110.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

12 REPLIES 12
v-xiaochen-msft
Community Support
Community Support

Hi @pityman ,

 

Please try this formula:

Office365Outlook.SendEmail("your email","Subject","Body",{Attachments:AddColumns(your collection.image, "Name", DisplayName, "ContentBytes", Value, "@odata.type", "")})

 

1\ This is my collection 'Test2'.

v-xiaochen-msft_0-1615790215844.png

 

2\ Add a button control and set its onselect property to:

v-xiaochen-msft_1-1615790288569.png

 

3\ The result is as follows:

v-xiaochen-msft_2-1615790363802.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

Thanks for your reply.

I would like to send the pic in html body instead of attachments

However, it seems like there is some error

pityman_0-1615797542303.png

Is it possible if i select the image with the title "Before....." and put in new column ?

I am only able to select the first image and put it in collection
After:First(ThisItem.Attachments).AbsoluteUri


pityman_1-1615797703140.png

 

 




v-xiaochen-msft
Community Support
Community Support

Hi @pityman ,

 

Please use 

AddColumns(First(FilteredCollection).image………….  instead of AddColumns(FilteredCollection.image

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Hi @v-xiaochen-msft 

It works for the first row. However , i have several rows in the collection need to send out as well.

 

pityman_0-1615798393160.png

My idea is to create a table in html body and attach the image

pityman_1-1615798542242.png

 

Is there any way to do it? also i need to put the before image and after image in the correct column

 

v-xiaochen-msft
Community Support
Community Support

Hi @pityman ,

 

Please refer to the steps below:

 

1\ This is my test collection ’Test2’.

v-xiaochen-msft_0-1615886703921.png

 

 

v-xiaochen-msft_1-1615886703937.png

 

v-xiaochen-msft_2-1615886703941.png

 

 

2\ Add a button control and set its onselect property to:

Office365Outlook.SendEmail("your email","Test", Concatenate("<table style=""width:100%"">

  <tr>

    <th>BBB</th>

    <th>image</th>

   

  </tr>" , Concat( ForAll(Test2,"

  <tr>

    <td>"&ThisRecord.BBB&"</td>

    "&Concat( ForAll(ThisRecord.image,"<td><img src="""&ThisRecord.AbsoluteUri&"""</img></td>"),Value)&"

  </tr>

"),Value),"</table>"),{IsHtml:true})

 

3\ The result is as follows:

v-xiaochen-msft_3-1615886703990.png

 

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

Hi @v-xiaochen-msft ,

Thank you for your reply.

I received the url instead of the image. May i seek your advice?

pityman_0-1615889448177.png



pityman_1-1615889525659.png

 

v-xiaochen-msft
Community Support
Community Support

Hi @pityman ,

 

Please try to delete </img .

v-xiaochen-msft_0-1615946339110.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

Hi @v-xiaochen-msft 

it works after i changed the code to 

pityman_0-1615946215642.png



In my image I have "before" and "After". is it possible to lookup the before image and put it in the same column?

pityman_1-1615946299698.png

 

Thanks @v-xiaochen-msft 

is it possible to put the image in the correct column based on the Display Name?

Example:

The Display name starts with Before will put in Finding Column whereas the display name starts with After will put in Rectification column 

pityman_0-1615959854535.png

pityman_1-1615959906020.png

 

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,846)