Adding columns to content query
I have created a Content Query that retrieves all of my tasks from my site collection that meets my filter criteria. However, The Item Views are incredibly limited
(basically just the title). I want to add ~5-7 additional columns to the query, such as due date. I understand I may have to do this through SharePoint designer. Please advise and if coding is required, please let me know what code to use.
Hi,
I understand that you want to add columns to content query web part.
To include additional columns in the Web Part's query, we need to perform some minor customization in the .webpart file. We should programmatically instruct the Web Part to rename columns to names the default XSLT transformation expects, and then render
the columns by using the default XSLT transformation styles. For more information:
http://msdn.microsoft.com/en-us/library/ms497457(v=office.14).aspx
But the default XSLT transformations can render the following four fields:
Title, Description, LinkUrl, and ImageUrl, we can add a column and display it as the
Description field in the Web Part. If we want the other columns to appear in addition to the KB title and product, modify the XSLT transformation and add the rendering for the additional columns.
More information:
How to: Customize the SharePoint Content By Query Web Part by Using Custom Properties (ECM):
http://msdn.microsoft.com/en-us/library/aa981241(v=office.14).aspx
How to: Customize XSL for the SharePoint Content By Query Web Part (ECM):
http://msdn.microsoft.com/en-us/library/bb447557(v=office.14).aspx
How to: Customize the Rendering of a Field on a List View:
http://msdn.microsoft.com/en-us/library/ff606773(v=office.14).aspx
Customizing List Views with XSLT Transformations:
http://msdn.microsoft.com/en-us/library/cc300164(v=office.12).aspx
Best Regards,
Linda Li
Similar Messages
-
Color coded calculated list column in content query web part
I have a calculated column in a list for displayig color coded values using the link
http://blog.splibrarian.com/2012/06/06/using-calculated-columns-to-add-color-coding-to-your-sharepoint-lists/
Now for rollup i am using the lists to display them in a content query web part so i have updated the .webpart file and imported and added, made changes in the item style and uploaded ad finally inserted the web part in the page.
But while diplaying hte custom column, it is being eing displayed as
string;#<DIV style='font-weight:bold; font-size:24px; color:green;'>•</DIV>
As you can notice it has appended string;# before the text. How do i avoid this? Thanks<xsl:value-of-select="@RAG" disable-output-escaping=“yes”
/> -
Adding columns in a query.
Hello,
I have 12 columns(jan,feb,mar,apr,......dec) in budget table.
Budget table:
year jan feb mar apr may jun jul aug sep oct nov dec
2009 1 2
2010 3 5
2009 3 5 6
I need to add the values of jan,feb,..... in a query and the sum of the same year.
Output of the query for the above table for 2009 should return 1+2+3+5+6=17 and for 2010 3+5=8
Please help me in writing the query to achieve the above result.
Thank uSomething like this?
with t as
select '2009' Year, 1 Jan, 2 Feb, null Mar, null Apr, null May, null Jun, null Jul, null Aug, null Sep, null Oct, null Nov, null Dec from dual union all
select '2010' Year, null Jan, null Feb, 3 Mar, null Apr, 5 May, null Jun, null Jul, null Aug, null Sep, null Oct, null Nov, null Dec from dual union all
select '2009' Year, null Jan, null Feb, 3 Mar, null Apr, 5 May, 6 Jun, null Jul, null Aug, null Sep, null Oct, null Nov, null Dec from dual
select t.Year, sum(nvl(t.Jan,0)+nvl(t.Feb,0)+nvl(t.Mar,0)+nvl(t.Apr,0)+nvl(t.May,0)+nvl(t.Jun,0)+nvl(t.Jul,0)+nvl(t.Aug,0)+nvl(t.Sep,0)+nvl(t.Oct,0)+nvl(t.Nov,0)+nvl(t.Dec,0)) as Year_Sum
from t
group by t.Year
/ -
Query Schema error adding columns for a query at workbench channel
Hello experts,
For our customer, we have created a custom query and it has been included into the query group Master Agreement List to be also used on the Master Agreement List Channel. However, when use tries to add columns, following error is raised:
Do you know if this issue can be fixed? Is there any system property controlling this property?
Thanks in advance and best regards,
IsaacHello Isaac,
Thank you for providing the additional details. Some of the saved changes to the advanced list page query is stored as XML data in the database, so as rightly pointed out by Bogdan it appears that you may have hit the limit especially when dealing with large number of columns. Since the limitation is
at the DB level our options for a solution will be limited as well. I’m following up with development team to see if there is a way to optimize the xml to make little bit more room or may be come up with an alternate approach. Either way it would require product code change. It would be helpful if you could open a message and add the details so we can track it.
Regards,
Vikram -
Adding column values in query designer
Hi,
I have requirement to add value in query designer the values should look like this
Column A Column B
10 10
20 30
30 60
40 100
the first values of column B will be same as Column A 10. The second value of column B = column A 1st value +Column A second value similarly Third value of column B = 1st + 2nd + 3rd values of column a. So on and so forth
Any help will be highly appriciated.
Regards,
rayHi
Just create the formula and go to the properties of that formula and go to the calculattion tab and in the "CALCULATE SINGLE VALUE AS " select the option the additive ( not sure but once check that will perform additive operation plz once check it) and select the cumulative check box.
I think u can get it , because in one of my project i did that calculation.
Hope u got it,
Thanx & Regards,
RaviChandra -
Content Query Web Part will not display all fields.
I would love some assistance on this. When I choose fields to display in the Web Part they do not appear. And I should say the the article "How to: Display Custom Fields in a Content Query Web Part" on the Developer Network is
a great start but it is only applicable to '07 and '10. Where is the detailed info for SP 2013??Hi,
According to your description, my understanding is that you want to display custom columns in Content Query web part in SharePoint 2013.
Per my knowledge, the method for SharePoint 2013 to display custom columns in Content Query web part is the same with SharePoint 2010.
The method in the link below is also can be used for SharePoint 2013:
http://msdn.microsoft.com/en-us/library/ms497457(v=office.14).ASPX
Do you encounter any issue when customizing in in a Content Query Web Part?
Here are some links about customizing the ItemStyle.xsl to display custom columns in Content Query web part in SharePoint 2013 for you to take a look:
http://prafulgoyal.blogspot.in/2013/04/sharepoint-content-query-webpart-oob.html
http://social.msdn.microsoft.com/Forums/en-US/49739730-47c1-43df-9d0e-ad506e6ca31b/display-multiple-columns-in-content-query-webpart
http://social.msdn.microsoft.com/Forums/en-US/1484df2b-0fb9-4b58-b833-a75019db88c7/content-query-display-multiple-columns?forum=sharepointgeneral
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
In content query webpart columns are not displaying after clicking on edit webpart.
Hi,
I created a content query webpart. I added one custom item style in ItemStyle.xsl. This template having some date operations. Some date comparisons. The issue is, template containing some variables but after selecting my template it is not showing the variable
names to enter the list column. What will be the issue? Below is the code..
<xsl:template name="BirthdayList" match="Row[@Style='BirthdayList']" mode="itemstyle">
<xsl:variable name="SafeImageUrl">
<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@Title"/>
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="EmployeeDesignation">
<xsl:value-of select="@EmployeeDesignation" />
</xsl:variable>
<xsl:variable name="Birthday">
<xsl:value-of select="@Birthday" />
</xsl:variable>
<xsl:variable name="dateTimeBirthday" select="ddwrt:FormatDate(string($Birthday), 1033, 3)" />
<xsl:variable name="dateOfBirthday" select="substring-before(substring-after($dateTimeBirthday, ', '), ', ')"
/>
<xsl:variable name="monthOfBirthday" select="substring-before($dateOfBirthday, ' ')" />
<xsl:variable name="yearOfBirthday" select="substring-after(substring-after($dateTimeBirthday, ', '), ',
')" />
<xsl:variable name="TodaysDateOfBirthday">
<xsl:value-of select="ddwrt:FormatDate(string(ddwrt:Today()), 1033,3)"/>
</xsl:variable>
<xsl:variable name="TodaysDateOfBirthdayyy" select="substring-before(substring-after($TodaysDateOfBirthday, ',
'), ', ')" />
<xsl:variable name="TodaysmonthOfBirthday" select="substring-before($TodaysDateOfBirthdayyy, ' ')" />
<xsl:variable name="TodaysyearOfBirthday" select="substring-after(substring-after($TodaysDateOfBirthday,
', '), ', ')" />
<xsl:if test="($dateOfBirthday)=($TodaysDateOfBirthdayyy)">
<xsl:if test="($monthOfBirthday)=($TodaysmonthOfBirthday)">
<div>
<div>
</div>
</div>
<table width="100%">
<tr width="100%">
<td width="80%">
<table>
<tr>
<td><b><xsl:value-of select="$DisplayTitle"/></b></td>
</tr>
<tr>
<td> <xsl:value-of select="$EmployeeDesignation"/>
</td>
</tr>
</table>
</td>
<td width="20%">
<table>
<tr>
<td valign="top">
<img width="60" height="60" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" title="{@ImageUrlAltText}" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
</xsl:if>
</xsl:template>Hi,
Based on your example above, which columns / variables are not appearing when editing the CQWP that you want to bind managed properties / list columns to?
Eric Overfield - PixelMill -
ericoverfield.com -
@EricOverfield -
Custom Column Name in Webpart file and Itemstyle for Content Query WebPart
I was trying to incorporate a custom column in the content Query WebPart.
The name of the column displayed in the list is "Risk Score"; a calculated column.
I right clicked on the field in the list settings and copy hte short cut which is pasted below:
http://<mainURL>/_layouts/FldEdit.aspx?List=%7BFE4CC761%2DE9B8%2D487C%2D8B92%2D1E42539144C4%7D&Field=Risk%5Fx0020%5FScore
Could you please let me know what can i type in the WebPart file exported and then to be imported in the section:
<property name="CommonViewFields" type="string"></property>
Also, please let me know what should i enter in the itemstyle.xsl in the section
<td style="width:30%; font-size:10px;font-family:Verdana;color:#007EB6; border-style:solid; border-width:medium;border-color:#E1E1E1;">
<xsl:value-of select="@Risk%5Fx0020%5FScore" />
</td>
TnxOk.
Use like this
<property name="CommonViewFields" type="string">RiskStrore,Lookup</property>
and include like this in the itemstyle
<td >Risk store
<xsl:value-of select="@RiskStore" />
</td> -
Adding columns in query causes renames of fields
Hi All, I'm using Oracle Reports Builder 10g. I have a query which has connections to other queries. When I try to add two columns into that query and recompile the RDF it automatically renames other fields adding "1" at the right side. Any ideas why this is happening? I'm not adding columns with names already existed. Thanks in advance, A. Stoyanov
Hi, The query is :
SELECT 0 CUSTOMER_TRX_ID,
rpad('a', 20, '-') TRX_NUMBER,
0 TERM_SEQUENCE_NUMBER,
rpad('a', 40, '-') TRX_TYPE,
rpad('a', 80, '-') TRX_TYPE_NAME,
'a' OPEN_RECEIVABLE_FLAG,
SYSDATE TRX_DATE,
0 SHIP_TO_CUSTOMER_ID,
0 SHIP_TO_CONTACT_ID,
0 REMIT_TO_ADDRESS_ID,
0 PRIMARY_SALESREP_ID,
rpad('a', 30, '-') CUSTOMER_NUMBER,
rpad('a', 240, '-') INTERNAL_NOTES,
0 BATCH_SOURCE_ID,
rpad('a', 240, '-') TRX_COMMENTS,
0 PREVIOUS_CUSTOMER_TRX_ID,
0 SHIP_TO_SITE_USE_ID,
0 PRINTING_COUNT,
SYSDATE PRINTING_ORIGINAL_DATE,
SYSDATE PRINTING_LAST_PRINTED,
'a' PRINTING_PENDING,
0 LAST_PRINTED_SEQUENCE_NUMBER,
SYSDATE START_DATE_COMMITMENT,
SYSDATE END_DATE_COMMITMENT,
0 INITIAL_CUSTOMER_TRX_ID,
rpad('a', 15, '-') INVOICE_CURRENCY_CODE,
0 TERM_ID,
SYSDATE SHIP_DATE_ACTUAL,
rpad('a', 30, '-') SHIP_VIA,
rpad('a', 50, '-') WAYBILL_NUMBER,
rpad('a', 50, '-') PURCHASE_ORDER_NUMBER,
rpad('a', 50, '-') PURCHASE_ORDER_REVISION,
SYSDATE PURCHASE_ORDER_DATE,
SYSDATE TERM_DUE_DATE_FROM_PS,
0 TERM_RELATIVE_AMOUNT,
rpad('a', 15, '-') TERM_NAME,
0 BILL_TO_CUSTOMER_ID,
0 BILL_TO_CONTACT_ID,
0 BILL_TO_SITE_USE_ID,
rpad('a', 40, '-') BILL_TO_LOCATION,
rpad('a', 360, '-') BILL_CUST_NAME,
rpad('a', 40, '-') BILL_ADDRESS1,
rpad('a', 40, '-') BILL_ADDRESS2,
rpad('a', 40, '-') BILL_ADDRESS3,
rpad('a', 40, '-') BILL_ADDRESS4,
rpad('a', 60, '-') BILL_CITY,
rpad('a', 60, '-') BILL_STATE,
rpad('a', 60, '-') BILL_POSTAL_CODE,
rpad('a', 60, '-') BILL_COUNTRY,
rpad('a', 50, '-') BILL_SITE_TAX_REFERENCE,
rpad('a', 50, '-') BILL_CUST_TAX_REFERENCE,
0 TRX_LINE_AMOUNT,
0 TRX_TAX_AMOUNT,
0 TRX_FREIGHT_AMOUNT,
0 TRX_ALL_AMOUNT,
rpad('a', 360, '-') ORDER_BY,
rpad('a', 240, '-') BILL_TO_ADDRESS1,
rpad('a', 240, '-') BILL_TO_ADDRESS2,
rpad('a', 240, '-') BILL_TO_ADDRESS3,
rpad('a', 240, '-') BILL_TO_ADDRESS4,
rpad('a', 60, '-') BILL_TO_STATE,
rpad('a', 60, '-') BILL_TO_PROVINCE,
rpad(‘a’, 150, ‘ - ’) our_ref,,
rpad(‘a’, 150, ‘ - ’) your_ref
FROM dual
WHERE 1 = 2
UNION ALL &common_query
The bind variable &common_query is accepting the following sql:
'SELECT
' ||:P_SEL_TRX_ID ||'
CUSTOMER_TRX_ID
' || :P_SEL_TRX_NUMBER ||'
TRX_NUMBER
NVL(TL.SEQUENCE_NUM,1)
TERM_SEQUENCE_NUMBER
' || :P_SEL_TRX_TYPE ||'
TRX_TYPE
, ' || :P_SEL_TRX_TYPE_NAME||'
TRX_TYPE_NAME
, TYPES.ACCOUNTING_AFFECT_FLAG
OPEN_RECEIVABLE_FLAG
, ' || :P_SEL_TRX_DATE ||'
TRX_DATE
, SHIP_TO_CUSTOMER_ID
SHIP_TO_CUSTOMER_ID
, SHIP_TO_CONTACT_ID
SHIP_TO_CONTACT_ID
, REMIT_TO_ADDRESS_ID
REMIT_TO_ADDRESS_ID
, A.PRIMARY_SALESREP_ID
PRIMARY_SALESREP_ID
, B.ACCOUNT_NUMBER
CUSTOMER_NUMBER
, A.INTERNAL_NOTES
INTERNAL_NOTES
A.BATCH_SOURCE_ID
BATCH_SOURCE_ID
A.COMMENTS
TRX_COMMENTS
, PREVIOUS_CUSTOMER_TRX_ID
PREVIOUS_CUSTOMER_TRX_ID
, SHIP_TO_SITE_USE_ID
SHIP_TO_SITE_USE_ID
, NVL(PRINTING_COUNT,0)
PRINTING_COUNT
, PRINTING_ORIGINAL_DATE
PRINTING_ORIGINAL_DATE
, PRINTING_LAST_PRINTED
PRINTING_LAST_PRINTED
, PRINTING_PENDING PRINTING_PENDING
, LAST_PRINTED_SEQUENCE_NUM LAST_PRINTED_SEQUENCE_NUMBER
, START_DATE_COMMITMENT START_DATE_COMMITMENT
, END_DATE_COMMITMENT END_DATE_COMMITMENT
, INITIAL_CUSTOMER_TRX_ID INITIAL_CUSTOMER_TRX_ID
, A.INVOICE_CURRENCY_CODE INVOICE_CURRENCY_CODE
, A.TERM_ID TERM_ID
, A.SHIP_DATE_ACTUAL SHIP_DATE_ACTUAL
, A.SHIP_VIA SHIP_VIA
, A.WAYBILL_NUMBER WAYBILL_NUMBER
, A.PURCHASE_ORDER PURCHASE_ORDER_NUMBER
, A.PURCHASE_ORDER_REVISION PURCHASE_ORDER_REVISION
, A.PURCHASE_ORDER_DATE PURCHASE_ORDER_DATE
, P.DUE_DATE TERM_DUE_DATE_FROM_PS
, NVL(TL.RELATIVE_AMOUNT,100)* (100/NVL(T.BASE_AMOUNT,100)) TERM_RELATIVE_AMOUNT
, T.NAME TERM_NAME
, A.BILL_TO_CUSTOMER_ID BILL_TO_CUSTOMER_ID
, A.BILL_TO_CONTACT_ID BILL_TO_CONTACT_ID
, A.BILL_TO_SITE_USE_ID BILL_TO_SITE_USE_ID
, U_BILL.LOCATION BILL_TO_LOCATION
, NVL(A_BILL.TRANSLATED_CUSTOMER_NAME,PARTY.PARTY_NAME) BILL_CUST_NAME
, RTRIM(RPAD(LOC.ADDRESS1,40)) BILL_ADDRESS1
, RTRIM(RPAD(LOC.ADDRESS2,40) ) BILL_ADDRESS2
, RTRIM(RPAD(LOC.ADDRESS3,40) ) BILL_ADDRESS3
, RTRIM(RPAD(LOC.ADDRESS4,40) ) BILL_ADDRESS4
, LOC.CITY BILL_CITY
, NVL(LOC.STATE , LOC.PROVINCE) BILL_STATE
, LOC.POSTAL_CODE BILL_POSTAL_CODE
, LOC.COUNTRY BILL_COUNTRY
, U_BILL.TAX_REFERENCE BILL_SITE_TAX_REFERENCE
, PARTY.TAX_REFERENCE BILL_CUST_TAX_REFERENCE
, ' ||:P_SEL_TRX_LINE_AMOUNT||' TRX_LINE_AMOUNT
, ' ||:P_SEL_TRX_TAX_AMOUNT ||' TRX_TAX_AMOUNT
, ' ||:P_SEL_TRX_FREIGHT_AMOUNT||' TRX_FREIGHT_AMOUNT
, ' ||:P_SEL_TRX_ALL_AMOUNT ||' TRX_ALL_AMOUNT
, ' || L_ORDER_BY || ' ORDER_BY
, LOC.ADDRESS1 BILL_TO_ADDRESS1
, LOC.ADDRESS2 BILL_TO_ADDRESS2
, LOC.ADDRESS3 BILL_TO_ADDRESS3
, LOC.ADDRESS4 BILL_TO_ADDRESS4
, LOC.STATE BILL_TO_STATE
, LOC.PROVINCE BILL_TO_PROVINCE
, a.attribute1 as our_ref
, a.attribute2 as your_ref
FROM ' || :P_TABLE1 || '
WHERE ' || :P_WHERE1 || '
' || :P_USER_WHERE_CLAUSE1 || '
' || :P_USER_WHERE_CLAUSE2 || '
' || :P_USER_WHERE_CLAUSE3 || '
' || :P_MLS_CONDITION || '
' || :P_EC_WHERE_CLAUSE || '
' || :P_BR_WHERE_CLAUSE || '
' || :lp_trx_num_high || '
' || :lp_trx_num_low || '
' || :lp_trx_date_clause ||'
' || :lp_doc_seq_clause|| '
UNION
SELECT ' || :P_SEL_TRX_ID || '
, ' || :P_SEL_TRX_NUMBER || '
, NVL(P.TERMS_SEQUENCE_NUMBER,1)
, ' || :P_SEL_TRX_TYPE || '
, ' || :P_SEL_TRX_TYPE_NAME || '
, TYPES.ACCOUNTING_AFFECT_FLAG
, ' || :P_SEL_TRX_DATE || '
, A.SHIP_TO_CUSTOMER_ID
, A.SHIP_TO_CONTACT_ID
, A.REMIT_TO_ADDRESS_ID
, A.PRIMARY_SALESREP_ID
, B.ACCOUNT_NUMBER
, A.INTERNAL_NOTES
, A.BATCH_SOURCE_ID
, A.COMMENTS
, PREVIOUS_CUSTOMER_TRX_ID
, SHIP_TO_SITE_USE_ID
, NVL(PRINTING_COUNT,0)
, PRINTING_ORIGINAL_DATE
, PRINTING_LAST_PRINTED
, PRINTING_PENDING
, LAST_PRINTED_SEQUENCE_NUM
, START_DATE_COMMITMENT
, END_DATE_COMMITMENT
, INITIAL_CUSTOMER_TRX_ID
, A.INVOICE_CURRENCY_CODE
, A.TERM_ID
, A.SHIP_DATE_ACTUAL
, A.SHIP_VIA
, A.WAYBILL_NUMBER
, A.PURCHASE_ORDER
, A.PURCHASE_ORDER_REVISION
, A.PURCHASE_ORDER_DATE
, P.DUE_DATE
, NVL(TL.RELATIVE_AMOUNT,100)*
(100/NVL(T.BASE_AMOUNT,100))
, T.NAME
, A.BILL_TO_CUSTOMER_ID
, A.BILL_TO_CONTACT_ID
, A.BILL_TO_SITE_USE_ID
, U_BILL.LOCATION BILL_TO_LOCATION
, NVL(A_BILL.TRANSLATED_CUSTOMER_NAME,PARTY.PARTY_NAME)
BILL_CUST_NAME
, RTRIM(RPAD(LOC.ADDRESS1, 40))
, RTRIM(RPAD(LOC.ADDRESS2, 40) )
, RTRIM(RPAD(LOC.ADDRESS3, 40) )
, RTRIM(RPAD(LOC.ADDRESS4 , 40) )
, LOC.CITY
, NVL(LOC.STATE , LOC.PROVINCE)
, LOC.POSTAL_CODE
, LOC.COUNTRY
, U_BILL.TAX_REFERENCE
, PARTY.TAX_REFERENCE
, ' || :P_SEL_TRX_LINE_AMOUNT || '
, ' || :P_SEL_TRX_TAX_AMOUNT || '
, ' || :P_SEL_TRX_FREIGHT_AMOUNT || '
, ' || :P_SEL_TRX_ALL_AMOUNT || '
, ' || L_ORDER_BY || '
, LOC.ADDRESS1
, LOC.ADDRESS2
, LOC.ADDRESS3
, LOC.ADDRESS4
, LOC.STATE
, LOC.PROVINCE
, a.attribute1 as our_ref
, a.attribute2 as your_ref
FROM ' || :P_TABLE2 || '
WHERE ' || :P_WHERE2 || '
' || :P_USER_WHERE_CLAUSE1 || '
' || :P_USER_WHERE_CLAUSE2 || '
' || :P_USER_WHERE_CLAUSE3 || '
' || :P_MLS_CONDITION || '
' || :P_EC_WHERE_CLAUSE || '
' || :P_BR_WHERE_CLAUSE || '
' || :lp_trx_num_low || '
' || :lp_trx_num_high ||'
' || :lp_trx_date_clause ||'
' || :lp_doc_seq_clause;
The columns I added are OUR_REF and YOUR_REF which are at the end of the SELECT clause.
Thanks,
A.Stoyanov -
Content Query display multiple columns
Hello,
I am using a content query web part (in sharepoint 2013) to display a list from another site. The problem is that I don't see enough info from that list because I can display maximum 2 columns.
Is it possible to display more columns from this list with the Content query web part? I would like to display all the columns from this list. Do i need to make a display template or something?
Thanks.You have to customize the CQWP.
Please check the below link
http://pholpar.wordpress.com/2010/01/21/displaying-results-in-multiple-columns-using-the-content-query-web-part/
Other option is you ca use Dataview webpart to show the list details from one site to other site
http://www.learningsharepoint.com/2012/08/12/sharepoint-2013-add-dataview-webpart-with-sharepoint-designer-2013/
http://sharepointgeorge.com/2009/display-sharepoint-list-site-data-view-web-part/
MCTS,MCPD Sharepoint 2010. My Blog-
http://www.sharepoint-journey.com
If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful -
How to display the field name in the tabulated view for a content query web part
I have added a content query web part changed the web part file to include custom columns imported and reffered itemstyle.xsl
to include the tabulated view for the content query.
However the way it is displayed is such that only the content is displayed.
As i am using a tabular view wto display the data, i want to display their field names as well.Hi ,
According to your description, my understanding is that you need to display the field in the tabulated view for a content query web part.
For your issue, please refer to the code as below:
<xsl:template name="VendorCustomStyle" match="Row[@Style='VendorCustomStyle']" mode="itemstyle">
<html>
<table width="100%">
<xsl:if test="count(preceding-sibling::*)=0">
<tr>
<td width="8%" valign="top"><div class="item"><b>Vendor ID</b></div></td>
<td width="12%" valign="top"><div class="item"><b>Vendor Name</b></div></td>
<td width="50%" valign="top"><div class="item"><b>Vendor Description</b></div></td>
<td width="10%" valign="top"><div class="item"><b>Vendor Country</b></div></td>
<td width="10%" valign="top"><div class="item"><b>Vendor Date</b></div></td>
<td width="10%" valign="top"><div class="item"><b>Created By</b></div></td>
</tr>
</xsl:if>
<tr>
<td width="8%" valign="top"><div class="item"><xsl:value-of select="@VendorID" /></div></td>
<td width="12%" valign="top"><div class="item"><xsl:value-of select="@Title" /></div></td>
<td width="50%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Description" disable-output-escaping="yes" /></div></td>
<td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Country" /></div></td>
<td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Date" /></div></td>
<td width="10%" valign="top"><div class="item"><xsl:value-of select="@Author" /></div></td>
</tr>
</table>
</html>
</xsl:template>
For more information, please have a look at the blog:
http://www.codeproject.com/Articles/756834/Customizing-the-Content-Query-Web-Part-and-Item-St
http://msdn.microsoft.com/en-us/library/ms497457.aspx
http://clarksteveb.hubpages.com/hub/Customized-Content-Query-Web-Part-CQWP-in-SharePoint-2007-with-results-Tabbed-Grouped-and-in-an-HTML-Table
http://blog.sharepointexperience.com/customitemstyle/
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Content Query Web Part Fields Documentation?
Hello community, I have a question about content query web part. I want to use it to display information from a custom large list with more than just the title and description columns that the default allows. For example, I have a list with 50k items in
it and 20 columns. I want to be able to create multiple CQWPs to display select data and select columns for the appropriate users.
I am looking for good accurate documentation to help implement this. I seem to be finding multiple methods that people are using and I am not sure what is best in terms of performance - which is ideally why I want to use the CQWP in the first place (prevent
people from loading the 50k item list over and over).
By default, the content query web part looks great for displaying links to specific documents, but I am hoping that it can be configured to essentially create a mini-list of the large list.
EDIT: Forgot to mention that this is with a custom content type and all custom fields.Figured this out a few days ago. Found that there really wasn't any documentation that helped me tremendously or explained in a way that I could understand it completely (user error??). There was one video that I found on YouTube that helped considerably.
I took some of what he did, but found that I could accomplish what he did with less than what he showed.
Pretty sure that by now everyone knows how to do this, but anyway, here is what I did:
I just exported a content query web part (after adding a blank one to a page), edited the CommonViewFields and the ItemXslLink (pointing to a copy of the original ItemStyle.xsl). Rename the copy of the file to whatever you want and then SAVE it locally (you
will upload it later to the Web Part Gallery or directly to the page for use when complete).
Create a new template at the bottom of the copy of the ItemStyle.xsl file (similar to all of the other templates that you see throughout the page).
Then make sure that the name that you selected for the name attribute of the template tag is exactly the same as the name that you will put in single quotes in the match attribute. Again you can use the existing templates on the page as a guide.
Copy and paste some of the existing variables to your template (add them between the opening and closing template tags). For instance, I added the 'SafeLinkUrl' variable, which I copied from above, so that I could have it render when I select my template
when I configure the web part on the page.
Then you can create new fields utilizing the
<xsl:value-of>
tags. Utilize the select attribute to get the field name that you want; use the examples in the page to help guide you. You can use plain old HTML to style your content. For example, I created a table to display my results.
The CommonViewFields property from the .webpart file should have the field names that you want to add in them already (because you edited that earlier).
Add the new CQWP that you just modified to the page that you want and select the template name from the drop-down to get the template that you created. You should then see your new fields there too!
This worked for me. If anyone needs clarification on what I wrote, let me know. Anyway, I know that I am a few years too late, but whatever - hopefully this can help someone else. -
Content Query Webpart For Slider
I'm trying to create a simple jquery slider with the help of Content Query Webpart in sharepoint 2013. Can anyone help me on this with a simple video or example like how I can achieve this.
Hi Sreejith,
To display the search results as a slider in Content Query web part(CQWP), we can upload the
JQuery plugin to SharePoint and create a Custom ContentQueryMain.xsl and ItemStyle.xsl to render the results.
Here are some examples about the detailed steps for integrating a Slider with the Content Query Web Part in the links below for your reference(same for SharePoint 2013):
http://www.nothingbutsharepoint.com/2012/06/18/sharepoint-integrate-a-slider-with-the-content-query-web-part-part-1-what-does-my-slider-need-to-work-aspx/
http://www.nothingbutsharepoint.com/2012/07/10/sharepoint-integrating-a-slider-with-the-content-query-web-part-part-2-setting-up-my-content-source-aspx/
http://www.nothingbutsharepoint.com/2012/08/27/sharepoint-integrate-a-slider-with-the-content-query-web-part-part-3-integration-with-the-cqwp-aspx/
https://www.pena.id/2014/08/adding-slider-sharepoint-using-content-query-web-part-cqwp/
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
How do I use the Parameters from URL to filter on Content Query in ItemStyle.xsl?
Hi, I might need your help with code that Content Query under <xsl:Template...> that I need a filter for 3 parameter from url (from date, to date(for date range) and type.
eg: www.mywebsite.com/pages/Filter.aspx?DateFrom=01/01/2012&DateTo=01/01/2013&Type=sports
I've google for help and not sure they seem working so far.Hi,
If you want to filter a Content Query Web Part with the parameters from URL, we can achieve it with OOTB of Content Query Web Part by adding "Additional Filters" in "Web Part Properties"->"Query". We can add
three filters like:
date is greater than [PageQueryString:DateFrom]
And
date is less than [PageQueryString:DateTo]
And
type is equal to [PageQueryString:Type]
Then redirect to the URL: www.mywebsite.com/pages/Filter.aspx?DateFrom=01/01/2012&DateTo=01/01/2013&Type=sports, the query results will be filtered.
Please reply freely if I misunderstand your meaning or there any other questions.
best regards
Patrick Liang
TechNet Community Support -
Content query web part is not working after chaning the DNS entry
Hi all,
We have a content query web part in the sharepoint site but it is not working after changing the DNS Entry for the web site ipaddress from one server to other . But it is working fine on the server, if we try to access the site from other system content
quey server its not working fine and its giving error message as bellow.
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
Can anyone help me to fix this issue please.I have custom XSLT . But it is working fine before changing the dns entry as soon as we change the DNS entry the content quey web part is not working. I tried to delete the content query web part and add it once again to the page, As soon as content query
web part is added to the page the fallowing error message is displayed.
Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
Can anyone help me to fix this issue please.
Maybe you are looking for
-
How do you go back to iOS 7 on iPhone 5?
My iPhone doesn't work properly after update to iOS 8.
-
Can no longer connect my B&W A7
Hello : Recently bought Airpot Extreme and my A7 will no longer connect via AirPlay. Do not know what to do B&W tech support wrote me this: If you are able to set up your A7 but, it will not work wirelessly network can you plea
-
Input field in REUSE_ALV_GRID_DISPLAY
Hi all! I'm using REUSE_ALV_GRID_DISPLAY FM and I have to alow the user to enter data in the screen. I'll displaying a list and the user need to fill quantities and save them then. I don't know hoy to declarate the field type. For the moment I'm on
-
Error during XML inbound via Function Module 'EDI_DATA_INCOMING'
Hi Team, I am facing below error while trying to upload a inbound XML file via Function Module 'EDI_DATA_INCOMING'. The control record must begin with <EDI_DC40 segment="1"> instead of Message no. EA719 Diagnosis The tag '<EDI_DC40 segment="1">' mus
-
Cisco Device Phone - MTP Required
Hi, I have some calls, that route to the Firewall and make the asymmetric route (one side Jabber got the video & audio; one side is no video & audio) After I set the "MTP requested" on Jabber softphones, that can get the audio both sides I just want