Hyperlink/Image column in Sharepoint list to generate custom URL using values from another column

Gizmaster 21 Reputation points
2022-07-22T13:14:41.857+00:00

In my Sharepoint list I have a Hyperlink column (formated for Images) and I'd like that column to automatically source the images from a folder in sharepoint...by adding the value from of another column (Title) as part of the URL.

So:

• I host all the images in a folder called 'Profile Pictures' (...sites/My Team/SiteAssets/Images/Profile%20Pictures)

• I name the image files using Full Name (Robert Murphy.png)

• The Title column on my Microsoft List is for Full name (Robert Murphy)

• I would like the hyperlink column to generate the URLs using the value from my Title Column:

i.e:
...sites/My Team/SiteAssets/Images/Profile%20Pictures/Robert Murphy.png

...sites/My Team/SiteAssets/Images/Profile%20Pictures /Ben Wallace.png

and so on

Is there a way of doing that?? Searched online but no luck

Thanks in advance

Microsoft 365 and Office SharePoint Development
0 comments No comments
{count} votes

Accepted answer
  1. Renjie Sun-MSFT 2,861 Reputation points Microsoft Employee
    2022-07-25T09:06:47.33+00:00

    Hi @Gizmaster ,

    According to my testing, you could create a flow to implement this function.
    224312-image.png

    My testing result:
    224324-image.png

    224266-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Gizmaster 21 Reputation points
    2022-07-25T13:36:17.107+00:00

    Hi @Renjie Sun-MSFT

    Thanks for your help.

    But unfortunately your solution will display the URL as a hyperlink only, it won't display the image itself.

    My 'Hyperlink' column is formated for Pictures,

    And once the Hyperlink column is formated for pictures then it won't appear as an option in 'Update Item'

    224413-screenshot-2022-07-25-at-142801.png


  2. Gizmaster 21 Reputation points
    2022-07-28T09:40:58.467+00:00

    Hi @Renjie Sun-MSFT

    Ok your suggestion did work, thank you very much. The only thing for people to be aware of is, once you choose to format the URL as Picture, it will not show up as an option in the 'Update Item' step in Power Automate. So to get round this you have to:

    1. Create your hyperlink column and format URL as 'Hyperlink'
    2. Create your flow as suggested above
    3. make sure the flow is working
    4. Now you can change the column settings to 'format URL as Picture'

    Now.... That's what I had to do initially, otherwise (if I did not change the column settings from hyperlink to pictures) all I could see were clickable URLs..... BUT after doing it a few times, I noticed that my column was showing the images even when 'format URL as Hyperlink is selected'

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.