cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dthope69
Level: Powered On

Picture in HTML Text

Hello All,

 

Is there a way to put SharePoint list attachment link from gallery into HTML control? If the list has 5 attachments can this also be done using CONCAT or something to list all attachment links, since some may be pics, docs, videos, etc?

 

Thanks,

Paul

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Picture in HTML Text

Hi @dthope69 ,

 

The formula depends on how many attachments are included for each item. For example, this formula would get the URL of the first attachment in an item:

 

First(ThisItem.'{Attachments}').AbsoluteUri

You can use below formula to show the concatenated mix of individual URLs:

Concatenate(First(ThisItem.'{Attachments}').AbsoluteUri," ",Last(FirstN(ThisItem.'{Attachments}',2)).AbsoluteUri)

Capture.JPG

 

To show Picture in HTML Text, we could use the <img> tag together with the image URL. 

For example:

Under the HTMLText property of the control, enter the following:

"Show your <b><font color=blue>HTML</font></b> text here.
<img src=""https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTf8peeAQ8Jbw4lowjdYM9OYVJFJr8EwgGNTsJ6BtbqPdNHWz2m""
alt=""Testing"" width=""500"" height=""100"">"

Which would give you the following result:

105.PNG

 

Yet I just tested with URL from attachment, this won't show the image inside HTML text control correctly. I think there should be some issue with the verification of the connection of SharePoint. 

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Community Support Team
Community Support Team

Re: Picture in HTML Text

Hi @dthope69 ,

 

The formula depends on how many attachments are included for each item. For example, this formula would get the URL of the first attachment in an item:

 

First(ThisItem.'{Attachments}').AbsoluteUri

You can use below formula to show the concatenated mix of individual URLs:

Concatenate(First(ThisItem.'{Attachments}').AbsoluteUri," ",Last(FirstN(ThisItem.'{Attachments}',2)).AbsoluteUri)

Capture.JPG

 

To show Picture in HTML Text, we could use the <img> tag together with the image URL. 

For example:

Under the HTMLText property of the control, enter the following:

"Show your <b><font color=blue>HTML</font></b> text here.
<img src=""https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTf8peeAQ8Jbw4lowjdYM9OYVJFJr8EwgGNTsJ6BtbqPdNHWz2m""
alt=""Testing"" width=""500"" height=""100"">"

Which would give you the following result:

105.PNG

 

Yet I just tested with URL from attachment, this won't show the image inside HTML text control correctly. I think there should be some issue with the verification of the connection of SharePoint. 

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dthope69
Level: Powered On

Re: Picture in HTML Text

Thank you! I will try this in a bit. Will mark as solved!


@v-monli-msft wrote:

Hi @dthope69 ,

 

The formula depends on how many attachments are included for each item. For example, this formula would get the URL of the first attachment in an item:

 

First(ThisItem.'{Attachments}').AbsoluteUri

You can use below formula to show the concatenated mix of individual URLs:

Concatenate(First(ThisItem.'{Attachments}').AbsoluteUri," ",Last(FirstN(ThisItem.'{Attachments}',2)).AbsoluteUri)

Capture.JPG

 

To show Picture in HTML Text, we could use the <img> tag together with the image URL. 

For example:

Under the HTMLText property of the control, enter the following:

"Show your <b><font color=blue>HTML</font></b> text here.
<img src=""https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTf8peeAQ8Jbw4lowjdYM9OYVJFJr8EwgGNTsJ6BtbqPdNHWz2m""
alt=""Testing"" width=""500"" height=""100"">"

Which would give you the following result:

105.PNG

 

Yet I just tested with URL from attachment, this won't show the image inside HTML text control correctly. I think there should be some issue with the verification of the connection of SharePoint. 

 

Regards,

Mona

 


 

dthope69
Level: Powered On

Re: Picture in HTML Text

Thanks Mona, worked perfectly! Trying the href along with img tag, is it a different attribute because that just comes up blank?