cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
burkslm
Nintex Newbie

Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

I am using Nintex Workflow and SharePoint 2010.

 

I have date1 and date2. There are occasions when date1 may be 'N/A'. If date2 - date1 > 30 days the ROW for that item will be one color. If date2 - date1 <= 30 days the ROW is another color and if date1 = 'N/A' it will be another color. How can I do this in a workflow. I was going to do it in SharePoint Designer and I couldn't figure out how to do it there either.

Labels: (1)
0 Kudos
Reply
17 Replies
andrewg
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

If you need the conditional formatting on the List View, then the traditional way in 2010 is to use a DataView in SharePoint designer. You could use a workflow to support this by doing the formula for you and assigning a value to a custom field to mark the color, but this can be accomplished in the DataView without it. A calculated field on the list item can probably accomplish the same thing a workflow calculation.

0 Kudos
Reply
burkslm
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

As the expert, which way would you do it?

0 Kudos
Reply
burkslm
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

I've done conditional formatting before. However, it was just based on another field's value not the calculation of two fields. And I didn't format the whole row just a single cell.

0 Kudos
Reply
andrewg
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

I'd upgrade to 2013 and use a display template!!

But in 2010, I probably would not use a workflow unless I couldn't get the value(condition) I needed for the DataView.

0 Kudos
Reply
andrewg
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

I didn't think of this at first, but even in 2010 you can use JQuery to change styles of elements. Review this if it is an option.

here is an example I found

$('input[type=checkbox]').change(function(){

    if($(this).prop('checked')){  

        $(this).parent().css('backgroundColor', '#bff0a1');

    }else{

        $(this).parent().css('backgroundColor', '#eee');       

    }

});

This example shows that you can query for an element based on attributes and then change the selected element's styles.

0 Kudos
Reply
burkslm
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

Unless I'm missing something, I don't think this will work. This is based on a SharePoint date field subtracting the current date then formatting the color. Based on the results of the calculations it will then determine the color. This thing has been on my nerves for TWO days. I'm now ready to throw my PC across the room! To make things worse, SharePoint Designer shows different results than the browser does! Ughhh!

0 Kudos
Reply
mmatsako
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

Hi Lisa,

 

Here is maybe and idea (please let me know more about what you need to do if I am way off here):  Inside of your workflow perform the date calculation.   Have another column that you can update with the color that you want this row to be as a result of your date calculation.  For example:  Column named "Color"  specify "Red"   then have whatever code you are using to change the row column color to be based on the color specified in this column.

 

Hopefully this helps?

Mike

0 Kudos
Reply
burkslm
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

Hey Mike,

Hmmmm....this is something to try. I'll take a look and let you know Mike. Thanks!

Lisa

0 Kudos
Reply
andrewg
Nintex Newbie

Re: Using Nintex to perform conditional formatting in a SharePoint list

Jump to solution

I hope that didn't hold you up, I mentioned that on the 19th.

The jquery could perform the calculation for you and then set the color, or look for a color value in a field and then set the color it wouldn't matter. I believe both possibilities could be accomplished with a dataview webpart as well.

0 Kudos
Reply