Community
Showing results for 
Search instead for 
Do you mean 
Reply

Filtering CustomEntity record

New Member
Posts: 2
Country: USA

Filtering CustomEntity record

Is there any way to filter a list of custom table records using multiple conditions so that the "operator" of the lookup is OR? I tried using an IFilterCriteria array, but it seems that the operator is set to "AND". I would like to be able to look up records so that they either have a particular value in one field, OR have another value in a separate field. What would be the best way to go about doing this?
Silver Super Contributor
Posts: 2,328
Country: USA

Re: Filtering CustomEntity record

You can change the operator to an OR.

 

Stan


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!
New Member
Posts: 2
Country: USA

Re: Filtering CustomEntity record

[ Edited ]

Hi Stan, Do you have any code samples for it? Below is the code I am using. Is there another property or something I am missing here?

 

 

CustomTable.GetCustomEntities(new SortCriteria[] { }, new IFilterCriteria[]
            {
                new ComparisonFilterCriteria(field1, ComparisonFilterCriteria.Operation.Equals, true),
                new ComparisonFilterCriteria(field2, ComparisonFilterCriteria.Operation.Equals, true)
            });
Silver Super Contributor
Posts: 2,328
Country: USA

Re: Filtering CustomEntity record

I must have been sleepy when I wrote that response.  I don't see a way to use an "OR" in  a ComparisonFilterCriteria.  You're probably going to have to create your own filter criteria class and use that.

 

Stan


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!