Evite la necesidad de datos de columna de búsqueda para una columna calculada (SharePoint 2010)

En 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.

preguntado el 30 de enero de 12 a las 19:01

2 Respuestas

You can take the lists and make them in External content types as tables in SQL server. Then you can do the calculations you like. Then display all the tables as external content types. Extenal content types look like lists and also have edit forms and etc.

contestado el 29 de mayo de 12 a las 16:05

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:

    <xsl:value-of select="@QuoteNoA" />
    <xsl:value-of select="@QuoteNoB" />

Changing this to something like the following should do the trick:

        <xsl:when test="@QuoteNoA != ''">
            <xsl:value-of select="@QuoteNoA" />
            <xsl:value-of select="@QuoteNoB" />

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)

Respondido el 31 de enero de 12 a las 08:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.