แฟ้มประวัติPaul Galvin's SharePoint...บล็อกรายการSkyDrive เครื่องมือ วิธีใช้
05 ธันวาคม

Yes/No (check box) filtering in Content Query Web Part

To filter for a query for the Yes/No check box entitled "PG Milestone", configure CQWP like this:

image

This is another one of those obvious-once-you-know-it but hard-to-find-an-answer-to questions: How to filter on a Yes/No check box using the content query web part.

The first search result I find using the search term "filter yes/no content query web part" is flat out wrong, so I thought I'd put this up there and see if it can replace the incorrect result in typical search results.

It's quite easy: True values = "1" and false values do not equal "1" (pretty retro, actually).

In the above example, I created site column of type "Yes/No (checkbox)" named "PG Milestone".  I added it to a doc library, uploaded a few documents, set the value for a couple and tested it.

 

<end/>

ข้อคิดเห็น (5)

โปรดรอสักครู่...
ขออภัย ข้อคิดเห็นที่คุณป้อนยาวเกินไป โปรดย่อให้สั้นลง
คุณไม่ได้ป้อนข้อมูลใดๆ โปรดลองอีกครั้ง
ขออภัย เราไม่สามารถเพิ่มข้อคิดเห็นของคุณได้ในขณะนี้ โปรดลองอีกครั้งในภายหลัง
ในการเพิ่มข้อคิดเห็น คุณต้องได้รับการอนุญาตจากผู้ปกครองของคุณ ร้องขอการอนุญาต
ผู้ปกครองของคุณได้ปิดการแสดงข้อคิดเห็น
ขออภัย เราไม่สามารถลบข้อคิดเห็นของคุณได้ในขณะนี้ โปรดลองอีกครั้งในภายหลัง
คุณแสดงข้อคิดเห็นเกินขีดจำกัดสูงสุดที่สามารถทำได้ในหนึ่งวันแล้ว โปรดลองอีกครั้งในอีก 24 ชั่วโมง
บัญชีของคุณถูกปิดใช้งานการแสดงข้อคิดเห็น เนื่องจากระบบของเราพบว่าคุณอาจกำลังสแปมผู้ใช้รายอื่น หากคุณมั่นใจว่าบัญชีของคุณถูกปิดใช้งานอย่างไม่ถูกต้อง โปรดติดต่อ ฝ่ายสนับสนุน Windows Live
ดำเนินการตรวจสอบความปลอดภัยทางด้านล่างเพื่อให้การแสดงข้อคิดเห็นของคุณเสร็จสมบูรณ์
อักขระที่คุณป้อนในการตรวจสอบความปลอดภัยต้องตรงกับอักขระในรูปภาพหรือเสียง
Paul Galvin ปิดข้อคิดเห็นในเพจนี้
Collinเขียน:
BTW, I am working in Access 2007
21 พ.ค.
Collinเขียน:
I have a question... I have an easy database with one table. Basically it consists of just a Name Field, Email Field and then several Yes/No Check Fields. I want to generate a query which list each email record of each which is checked "Yes". I have a qyery which each Yes/No field on it. And this formula: [Forms]![FORM WITH CHECK BOXES].[Yes/No FIELD NAME].. SO it points to a form where I can check multiple boxes and then the form has a button to run the query... It works fine except the relationship is an "AND" relationship where if an email record has Check Box 1 & Check Box 2 checked, I have to filter exactly like that. What I want is if Check Box 1 & Check Box 2 is checked to get result which include those records as well as the records where Only Check Box 1 is checked and the records where Check Box 2 is checked... Any ideas?
21 พ.ค.
ไม่มีชื่อเขียน:
Hi,

Great blog with interesting informations.
I can use it t solve my problem.

Thanx
M.
http://www.vanjobb.hu/
15 พ.ค.
Alan Liเขียน:
BTW, could you please reply via email (lheran@gmail.com) or comment on this blog? Thank you.
2 ต.ค.
รูปภาพของ ไม่ระบุชื่อ
Alan Li เขียน:
Hi, this article is very useful for me.
Can I ask how do you set up the CQWP file for filtering on Yes/No check box (Say ImportantNotices)? Is that right below?
 
<property name="FilterField2" type="string">ImportantNotices</property>
<property name="FilterValue2" type="string">Yes</property>

<property name="FilterOperator2" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Eq</property>
<property name="FilterType2" type="string">Text</property> 

 

Thanks very much for your help.

 

 
2 ต.ค.

การติดตามข้อมูล (4)

URL การติดตามข้อมูลสำหรับข้อมูลนี้คือ:
http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!463.trak
เว็บล็อกที่อ้างอิงข้อมูลนี้