Stump the Panel: SharePoint Q&A

Immediate solutions for common SharePoint questions
It is currently Wed May 22, 2013 11:57 am

All times are UTC - 5 hours [ DST ]


Forum rules


What you are viewing is an archive of Stump the Panel. It remains for reference purposes. Please post all new questions on NothingButSharePoint.com
https://www.nothingbutsharepoint.com/sites/eusp/Forum



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Greater than 7 Nested if
PostPosted: Mon Apr 12, 2010 12:04 pm 
Offline

Joined: Sun Jan 03, 2010 8:22 am
Posts: 181
Jeff, you have the column names mixed up. [Color] is the column that contains the formula, not the column used in the calculation.
Just checking - do you have exactly 8 users, or is it just an example? Because the 8th user can be inserted instead of the "no selection" option. Seven IFs actually mean 8 options.


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Mon Apr 12, 2010 12:34 pm 
Offline

Joined: Fri Apr 09, 2010 10:56 am
Posts: 9
Thanks Christophe. I actually have 14 users. I did not want to burden Dessie with all the extra code. I was going to try and work on that myself by taking your code and then adding to it with my extra users to total 7 in each calculated field.

Is there code you could provide me to accomplish this. Maybe tweaking what Dessie has already provided?

Dessie mentioned I would have to replace the "color" (ie red) with the actual HTML color code. Is that right?

Thank you
Jeff


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Mon Apr 12, 2010 1:07 pm 
Offline

Joined: Sun Jan 03, 2010 8:22 am
Posts: 181
Jeff,

Use the following formula for the Color column and let me know if this works for you:

=IF([User Column]="","Black",IF([User Column]="User1","Red",IF([User Column]="User2","Gold",IF([User Column]="User3","Green",IF([User Column]="User4","DarkBlue",IF([User Column]="User5","DarkCyan",IF([User Column]="User6","DarkRed",IF([User Column]="User7","Gray",""))))))))&IF([User Column]="User8","Red",IF([User Column]="User9","Gold",IF([User Column]="User10","Green",IF([User Column]="User11","DarkBlue",IF([User Column]="User12","DarkCyan",IF([User Column]="User13","DarkRed",IF([User Column]="User14","Gray","")))))))


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Mon Apr 12, 2010 2:19 pm 
Offline

Joined: Fri Apr 09, 2010 10:56 am
Posts: 9
Christophe:
I think you nailed it. Hard to tell red from darkred

Here is what I have to be on the same page:
1. Created a calendar

2. Created a "Choice" column called UserColumn and added users 1-14

3. Created a "Color" calculated field column and pasted your exact code =IF([UserColumn]="","Black",IF([UserColumn]="User1","Red",IF([UserColumn]="User2","Gold",IF([UserColumn]="User3","Green",IF([UserColumn]="User4","DarkBlue",IF([UserColumn]="User5","DarkCyan",IF([UserColumn]="User6","DarkRed",IF([UserColumn]="User7","Gray",""))))))))&IF([UserColumn]="User8","Red",IF([UserColumn]="User9","Gold",IF([UserColumn]="User10","Green",IF([UserColumn]="User11","DarkBlue",IF([UserColumn]="User12","DarkCyan",IF([UserColumn]="User13","DarkRed",IF([UserColumn]="User14","Gray","")))))))

4. Followed rest of instructions on pathtosharepoint with creating a display column, adding webpart and adding txt file to webpart.

5. Users must really pick colors that are not close to each other.

Thank you so much. Look forward to your next update.
Jeff


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Mon Apr 12, 2010 3:01 pm 
Offline

Joined: Fri Apr 09, 2010 10:56 am
Posts: 9
Hey Christophe:
Is there a way of having the font color all the same on all the entries, just color the background, or have a color transparency with black font for example? I was looking at your choices on the form builder on pathtosharepoint.

Anyway of manipulating the font size?

Thanks again, it is GREAT!!!!

Jeff


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Tue Apr 13, 2010 4:24 am 
Offline

Joined: Sun Jan 03, 2010 8:22 am
Posts: 181
Just color the background: yes, it is in the list of options.

You can actually do anything you want with the styles. My form acts on the font color, the background color and the border, but you can also change the font weight, font size, etc. See your usual css reference for details.

I have also published a post that explains how to work around the limit of 7 choices:
http://blog.pathtosharepoint.com/2010/0 ... ed-column/


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Tue Apr 13, 2010 5:44 pm 
Offline

Joined: Fri Apr 09, 2010 10:56 am
Posts: 9
Christophe:
Can you give me a good css reference so I can play with the font weight, font size, etc.
This is new to me as well.
I assume I would modify the "style" section in the display calculated column?

Thank you again!!!!
Jeff.


Top
 Profile  
 
 Post subject: Re: Greater than 7 Nested if
PostPosted: Tue Apr 13, 2010 7:55 pm 
Offline

Joined: Sun Jan 03, 2010 8:22 am
Posts: 181
You could start with w3schools.com.

And yes, look at the style attribute, which is the clean way to include styles in HTML. For more advanced designs, you can also use the class attribute, and define your styles in a separate stylesheet.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group