In SharePoint 2010:
I have a master list that pulls several columns from two different lists based on a unique ID. The information that's being pulled in is similar, but being entered by two different people for two different customers and must be in separate lists. Let's say the similar columns used in the master list are Quote No., Price, Quote Date and Customer and this information on the Master List is coming from List A and List B.
In this Master List, I would like to see all of the line items and only the corresponding look-up columns that have information in them. For example, if Item 0025 has a Quote No., Price, Quote Date and Customer information from List A, I don't want 4 blank columns where the information from List B would go, and vice versa. I just want one column for Quote No. that has the information, regardless of where it came from.
My original thought was to hide the look-up columns and create a calculated column that would search through and see "if Quote No. Look-up column from List A is empty, show nothing. If Quote No. Look-up column from List A has a value, display this value" and so forth.
But since you can't perform calculations on a look-up column I'm at a loss for how to display this appropriately. There are about 10 columns being pulled in from these other lists and 35+ columns total.
Any ideas? I'm happy to send in screen shots or explain the situation in more detail.
You could do this by using a data view web part and then modifying the XSLT through SharePoint Designer.
Simply create the data view web part, importing all 8 similar columns, then convert it to it's XSLT view.
Then, besides the other 35 columns, you will have four sections of code similiar to this:
Changing this to something like the following should do the trick:
Don't forget to change the column header titles and remove the four extra columns that you do not need anymore (all done through the XSLT)