3

Can anyone help with setting up a progress status on documents in a document library. I would love something similar to the attached.enter image description here

1

The simplest way is to use a Calculated Column (set to datatype=Number!!! to output HTML)

=IF(NOT(OR([Task Status]="Not Started",[Task Status]="Completed"))
    , "<div style=""position:relative;width:100%;height:1.5em;border:1px solid grey;"">"
        &"<div style=""position:absolute;height:100%;text-align:left;"
             &"background-color:"&  [color]
             &";width:"&  [% Completed]  &"%;"">"
        &  [% Completed]
        &"%</div>"
      &"</div>"
    ,"")

Pros:

  • Works in 2010/2013 in any View (not on Forms)
  • No need for CSR files/JSlinks (2013)

Cons:

  • Displays HTML code as text in Alerts, CQWP, Content & Struture View
  • Adds this HTML for every ListItem (so not very mobile friendly)

The 2013 (CSR) Client Side Rendering way

See: jslink on Tasks % Complete field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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