0

I have the following list in a sharepoint 2013 site. I would like to remove the "Approval Problem Status" hyperlink from the list view. In this case is showing as "In Progress" but I only want to maintain the text. This field comes from the default Approval workflow and I'm just showing the status if approved or not.

List View

I have already tried this link and this link but with no success. Any other options?

Regards!

2 Answers 2

0

I already found the solution by using CSR (Client Side Rendering). The javascript was correct but it was not working with:

<script type="text/javascript">
  $(document).ready(function(){ 
    $("a[href*='http://myserveraddress/sites/mysite/_layouts/15/WrkStat.aspx']").contents().unwrap();   
  });   
</script>

The way it works fine is as follows:

<script type="text/javascript">
 SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
 OnPostRender: function(ctx) {                      
        $("a[href*='http://myserveraddress/sites/mysite/_layouts/15/WrkStat.aspx']").contents().unwrap();       
    }
}); 
</script>

And this works for any hyperlink column of the list view including lookups.

Best Regards.

2
  • *= means containing a string, so you do not need that whole path. nor the a reference.. "[href*='Wrk']" is enough. If you only want to hide, a CSS rule [href*='Wrk']{display:none} is enough Commented Sep 9, 2016 at 21:55
  • Thanks Danny, your suggestion works well. Javascript can be reduced
    – Noah
    Commented Sep 27, 2016 at 16:23
0

Can you create a calculated field to =[Approval progress status] ? Then add this to the view and remove the original?

1
  • I cannot use calculated fields since it is a column that is displayed from a workflow status I'm not able to select it in the calculated field options. Adding the Script Editor Webpart and the javascript solved it.
    – Noah
    Commented Sep 27, 2016 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.