Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Only display the repeater output if a boolean value is 'Yes' View modes: 
User avatar
Member
Member
R. Thakoerdat. - 9/4/2012 9:21:29 AM
   
Only display the repeater output if a boolean value is 'Yes'
Hello all,

I am trying to do the following.
I have a repeater wich displays fields from a document type.
Currently it displays the folowing:

Company name
Company adress data
Company website

Some of the companies are certified partners. In the current repeater all companies are displayed. But i want to create another repeater that only displays the certified partners.
I have added a Boolean 'Yes' 'No' checkbox. But I don't know how to use is to "filter" the companies and only display the ones that are certified.

Can I copy the whole repeater output code to a new repeater and build a "check" around it?

Any help is appreciated.


R. Thakoerdat

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/4/2012 10:51:12 AM
   
RE:Only display the repeater output if a boolean value is 'Yes'
Can you write your check in the where condition of the webpart?

Here is an example. Remember, the "Where" keyword is already in the query.

"YourBooleanColumnName = 1"

It should be that simple to filter out the items where that column is 0(false)

User avatar
Kentico Support
Kentico Support
kentico_janh - 9/4/2012 4:49:41 PM
   
RE:Only display the repeater output if a boolean value is 'Yes'
Hello,

Yes, exactly. For the duplication of your repeater, please open its context menu and choose Duplicate web part from the menu. And please fill the WHERE condition property of that new repeater as it was described.

Best regards,
Jan Hermann

User avatar
Member
Member
R. Thakoerdat. - 9/5/2012 2:42:12 AM
   
RE:Only display the repeater output if a boolean value is 'Yes'
Jiveabillion, kentico_janh,

The WHERE helped me out. I can't beleve it was that simple.
Thanks a billion :).

R. Thakoerdat.