web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Entity list: replace a...
Power Pages
Answered

Entity list: replace ahref text to display icon

(0) ShareShare
ReportReport
Posted on by 7,044 Most Valuable Professional

Hi Folks, 

 

     In one of the entity list I would like to replace the ahref text to display an icon. Here is my attempt using jQuery 

 

 

$(document).ready(function () {

console.log(555, "console loading");

$(".entitylist.entity-grid").on("loaded", function () {
 

 $(this).children(".view-grid").find("td[data-attribute='cra0d_app']").each(function (i, e){
console.log(222, "name of column loading");
 var value = $(this).data(value);
console.log("666value Var", value);
 if(value.value == "https://testportal.powerappsportals.com/poc/testApp/")

 {
 console.log(444, "condition triggering");

 // $("a").text("Show this text"); 
 

 }

 else{

 console.log(444, "Not triggering");

 }

 });

 });

});

 

  

The above code is changing all <a> tag text to "Show". How do I replace only for the Logical name (cra0d_app) column only. 

 

 

Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at

    hi @ragavanrajan 

    I have an article that might help: http://oliverrodrigues365.com/2020/05/24/power-apps-portals-generate-and-download-word-document-from-an-entity-list/

    what I am doing there is first triggering a workflow to generate a Word Document, and populating a URL within a column in my entity list.. and then adding an icon to download the document based on the URL

  • Verified answer
    ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

     Thanks @OliverRodrigues. Indeed I referred to your blog and it is absolutely useful. I just need to do a little tweak to display the icon. Just in case if anyone is trying to display an icon instead of a hyperlink URL. Below is the code 

     

     

    $(document).ready(function () {
    
    console.log(555, "console loading");
    
    $(".entitylist.entity-grid").on("loaded", function () {
     
    
     $(this).children(".view-grid").find("td[data-attribute='cra0d_app']").each(function (i, e){
    console.log(222, "name of column loading");
     var value = $(this).data(value);
    console.log("666value Var", value);
     if(value.value == "https:////testportal.powerappsportals.com/poc/testApp/")
    
     {
     console.log(444, "condition triggering");
     var downloadElement="";
     downloadElement += "<a href='"+this.innerText+"'>";
     downloadElement += "<button type='button' class='btn btn-default btn-lg'>";
     downloadElement += "<span class='glyphicon glyphicon-phone' aria-hidden='true'/>";
     downloadElement += "</button>";
     downloadElement += " </a>";
     $(this).html(downloadElement);
     
    
     }
    
    
     else{
    
     $(this).closest('tr').css("background-color", "#ffffff");
    
     }
    
     });
    
     });
    
    });

     

     

    And the output: 

     

    ragavanrajan_0-1624414529045.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 55

#2
11manish Profile Picture

11manish 48

#3
Valantis Profile Picture

Valantis 46

Last 30 days Overall leaderboard