Forum Discussion

NaderHadjebi's avatar
NaderHadjebi
Copper Contributor
Sep 02, 2021

Replacing text with an image in a list column (SharePoint Online)

Hello all,

I have a SharePoint Online list and on one column I have codes that correspond to icons. What is a good way to replace the text with corresponding icons?

thanks,

Nader

  • tauseefsh's avatar
    tauseefsh
    Copper Contributor
    NaderHadjebi - I am afraid there is no such option within SharePoint. You can create a new column of picture type and then use Power of Power Automate (Flow) to update this icon column automatically every time there is a new item created or updated in the list. This would automatically update the icons based on the title of icon stored in different column.

    Please note you need to ensure the images are uploaded in same document library for your flow to be simple and fast.
    • NaderHadjebi's avatar
      NaderHadjebi
      Copper Contributor
      Thanks for the reply. I will try the Power Automate option. I will also try editing the original data file in Excel (I think there is a way to replace text with an image in excel) and make it in to a list again. I will update this thread with the results.
      • NaderHadjebi's avatar
        NaderHadjebi
        Copper Contributor

        NaderHadjebi tauseefsh This is an update to the progress on resolving this. I have had some progress by formatting the column with JSON (did not take Power Automate or Excel Option). It is not 100% the way I want it, but getting there. I will make another post with the final result.
        column formatting with JSON

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    NaderHadjebi if those icons are stored on your site then you could create a hyperlink or picture column (from List Settings) and for the Format URL dropdown click Image. Then you add the link to the icon into the column and it will display the icon/image in the list:

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

    • NaderHadjebi's avatar
      NaderHadjebi
      Copper Contributor
      Thanks Rob. I have to create the icons for each item. I am looking for a way to automatically swap out the names with the corresponding icon without having to do it row by row, since there are hundreds of rows.
      • RobElliott's avatar
        RobElliott
        Silver Contributor

        NaderHadjebi not possible I think. You can't mix & match column types and can't just change a text column to a Hyperlink or Pitcure ort an Image column without losing the data.

         

        Rob
        Los Gallardos
        Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Resources