Bold a List Item


Badge +6

This may be more of a general Sharepoint question...

Once my Nintex form is submitted, if a certain field ('assigned to') is not completed within a matter of 3 days, I would like the list view to show the row (or a particular field in the row) to show as bold/red.  To bring attention to it basically.

Is that possible within Nintex, Workflows or something within Sharepoint itself?  Preferably something easy a non-developer like me can manage?


10 replies

Badge +6

An easy way to do that would be to create an new view in the SharePoint list, name it Overdue Items, add a filter to show items that meet your criteria. you can then make this the default view or you can add the list to a page in the sharepoint site and set the web part to use the new view.

By creating a new page, call it Workflow Status, Dashboard, or something similiar, you can display data from multiple sharepoint lists in one place 

Userlevel 5
Badge +14

you can easily do that with calculated list field.

let's  assume you have "Status" list field which you'd like to highlight for items approved after 3 days.

then create a caclulated list field with a formula like

=IF([Status]="Approved",IF(Approved-Created>3,"<DIV style='background-color: red' ><STRONG>"&[Status]&"</STRONG></DIV>","<DIV style='background-color: green' ><STRONG>"&[Status]&"</STRONG></DIV>"),[Status])

note to configure field value is numeric

212315_pastedImage_1.png

list view might then look like

212316_pastedImage_2.png

Badge +6

Thanks!  I think you have me on the right track!  But the formula is giving me an error.

My "Status" options are Submitted, In Progress and Complete.  If the Status stays in Submitted for longer than 3 days (from the Created Date), I'd like the calculated list field to have that red background as you're showing.

I changed up your formula with:

=IF([Status]="Submitted",IF(Submitted-Created>3,"<DIV style='background-color: red' ><STRONG>"&[Status]&"</STRONG></DIV>","<DIV style='background-color: green' ><STRONG>"&[Status]&"</STRONG></DIV>"),[Status])

Do I need to add an additional date column to have that happen?  There's not necessarily an approval date with what I am working on.  Really just need to call attention to something that hasn't been moved to "In Progress" after 3 days.

Userlevel 5
Badge +14

But the formula is giving me an error.

depends on your environment configuration you might need to use semicolon as separator instead of commas.

Badge +6

=IF([Status]="Submitted";IF(Submitted-Created>3;"<DIV style='background-color: red' ><STRONG>"&[Status]&"</STRONG></DIV>";"<DIV style='background-color: green' ><STRONG>"&[Status]&"</STRONG></DIV>");[Status])

Didn't seem to correct the issue.  Is it a problem that I do not have a "Submitted" column?

In your example, it appears you might be referring to the Approved Date column?  Or is the "Approved" mention in your script, pulling from your Status dropdown?

I'm not very experienced with devloping/JS...

Userlevel 5
Badge +14

sure, if you want to evaluate 3 days difference you have to compare two date fields.

if you want to compare created date with current date, you could use [Today] sharepoint's placeholder. Note, however, [Today] is only recalculated when an item is updated.

Badge +6

I tried this to no avail:

=IF([Status]="Submitted",IF([Today]-Created>3,"<DIV style='background-color: red' ><STRONG>"&[Status]&"</STRONG></DIV>","<DIV style='background-color: green' ><STRONG>"&[Status]&"</STRONG></DIV>"),[Status])

"Note, however, [Today] is only recalculated when an item is updated."

^ If I am understanding correctly, I'm not sure this would work as I need the formula to work automatically.  Basically, the reason for the red background is because the record hasn't been updated in 3 days.

Userlevel 5
Badge +14

I tried this to no avail:

so I would suggest to build the formula step by step from simplest expressions, until you find where it fails.

[Today]

[Today]-Created

[Today]-Created>3

IF([Today]-Created>3,"true","false)

etc.

If I am understanding correctly, I'm not sure this would work as I need the formula to work automatically.

unfortunately, that's the way how sharepoint's list view works.

you could create a site workflow that would update each item in the list to get calculation updated and schedule it to run (eg.) nightly. it will, however, generate new item version. not sure if that's a concern for you or not.

other option would be to use client side rendering sharepoint feature. it gives you full control over how list view is rendered. but it's a bit more complex - you need to write your custom javascript code that would handle it.

see some examples eg. here

How to change row's color based on status field 

 

Badge +6

I went ahead and created a SLA date field that is 3 days after the created date.

Maybe another route would be to use that newly created date field, and if an "Assigned" field is left blank, then show a red background?

Need help with putting this in a formula for a new calculated list field:  If it is the SLA Date AND "Assigned" field is blank, then return the red background? 

Userlevel 5
Badge +14

 Maybe another route would be to use that newly created date field, and if an "Assigned" field is left blank, then show a red background?

that will not make any difference to the formula above.

you would need to compare SLA date field to [Today], but [Today] will still be recalculated just on item update.

Need help with putting this in a formula for a new calculated list field: 

the formula might look like

=IF(AND([Assigned]="",TODAY()=DATE(YEAR([SLADate]),MONTH([SLADate]),DAY([SLADate]))),"<DIV style='background-color: red' ><STRONG>"&[Status]&"</STRONG></DIV>","<DIV style='background-color: green' ><STRONG>"&[Status]&"</STRONG></DIV>")‍‍

Reply